Define MODPLUG_LIBS to override libmodplug

This commit is contained in:
Gregory Montoir 2021-12-15 21:27:16 +08:00
parent 4aa89bc91d
commit 140d278724
1 changed files with 5 additions and 3 deletions

View File

@ -2,6 +2,8 @@
SDL_CFLAGS := `sdl2-config --cflags` SDL_CFLAGS := `sdl2-config --cflags`
SDL_LIBS := `sdl2-config --libs` 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 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 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 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 all: blues bbja pre2
blues: main.o sys_sdl2.o util.o $(BB_SRCS:.c=.o) 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) 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) 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: clean:
rm -f $(OBJS) $(DEPS) *.o *.d rm -f $(OBJS) $(DEPS) *.o *.d