From 140d278724ae2d26f8328cb822f36cff4ef73c8e Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Wed, 15 Dec 2021 21:27:16 +0800 Subject: [PATCH] Define MODPLUG_LIBS to override libmodplug --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 31e76ab..1036f7e 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ SDL_CFLAGS := `sdl2-config --cflags` SDL_LIBS := `sdl2-config --libs` +MODPLUG_LIBS ?= -lmodplug + BB := decode.c game.c level.c objects.c resource.c screen.c sound.c staticres.c tiles.c unpack.c JA := game.c level.c resource.c screen.c sound.c staticres.c unpack.c P2 := bosses.c game.c level.c monsters.c resource.c screen.c sound.c staticres.c unpack.c @@ -18,13 +20,13 @@ CPPFLAGS += -Wall -Wpedantic -MMD $(SDL_CFLAGS) -I. -g all: blues bbja pre2 blues: main.o sys_sdl2.o util.o $(BB_SRCS:.c=.o) - $(CC) $(LDFLAGS) -o $@ $^ $(SDL_LIBS) -lmodplug + $(CC) $(LDFLAGS) -o $@ $^ $(SDL_LIBS) $(MODPLUG_LIBS) bbja: main.o sys_sdl2.o util.o $(JA_SRCS:.c=.o) - $(CC) $(LDFLAGS) -o $@ $^ $(SDL_LIBS) -lmodplug + $(CC) $(LDFLAGS) -o $@ $^ $(SDL_LIBS) $(MODPLUG_LIBS) pre2: main.o sys_sdl2.o util.o $(P2_SRCS:.c=.o) - $(CC) $(LDFLAGS) -o $@ $^ $(SDL_LIBS) -lmodplug + $(CC) $(LDFLAGS) -o $@ $^ $(SDL_LIBS) $(MODPLUG_LIBS) clean: rm -f $(OBJS) $(DEPS) *.o *.d