2018-07-08 16:08:53 +02:00
|
|
|
|
|
|
|
SDL_CFLAGS := `sdl2-config --cflags`
|
2018-07-16 14:43:34 +02:00
|
|
|
SDL_LIBS := `sdl2-config --libs`
|
2018-07-08 16:08:53 +02:00
|
|
|
|
2018-12-16 13:34:03 +01:00
|
|
|
BB := decode.c fileio.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
|
2019-05-29 01:54:47 +02:00
|
|
|
P2 := game.c level.c resource.c screen.c sound.c staticres.c unpack.c
|
2018-12-16 13:34:03 +01:00
|
|
|
|
|
|
|
BB_SRCS := $(foreach f,$(BB),bb/$f)
|
|
|
|
JA_SRCS := $(foreach f,$(JA),ja/$f)
|
2019-05-29 01:54:47 +02:00
|
|
|
P2_SRCS := $(foreach f,$(P2),p2/$f)
|
|
|
|
SRCS := $(BB_SRCS) $(JA_SRCS) $(P2_SRCS)
|
2018-07-08 16:08:53 +02:00
|
|
|
OBJS := $(SRCS:.c=.o)
|
|
|
|
DEPS := $(SRCS:.c=.d)
|
|
|
|
|
2019-05-29 01:54:47 +02:00
|
|
|
CPPFLAGS += -Wall -Wpedantic -MMD $(SDL_CFLAGS) -I. -g
|
2018-12-16 13:34:03 +01:00
|
|
|
|
2019-05-29 01:54:47 +02:00
|
|
|
all: blues bbja pre2
|
2018-12-16 13:34:03 +01:00
|
|
|
|
|
|
|
blues: main.o sys_sdl2.o util.o $(BB_SRCS:.c=.o)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(SDL_LIBS) -lmodplug
|
2018-07-08 16:08:53 +02:00
|
|
|
|
2018-12-16 13:34:03 +01:00
|
|
|
bbja: main.o sys_sdl2.o util.o $(JA_SRCS:.c=.o)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(SDL_LIBS) -lmodplug
|
2018-07-08 16:08:53 +02:00
|
|
|
|
2019-05-29 01:54:47 +02:00
|
|
|
pre2: main.o sys_sdl2.o util.o $(P2_SRCS:.c=.o)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(SDL_LIBS) -lmodplug
|
|
|
|
|
2018-07-08 16:08:53 +02:00
|
|
|
clean:
|
2019-05-29 01:54:47 +02:00
|
|
|
rm -f $(OBJS) $(DEPS) *.o
|
2018-07-08 16:08:53 +02:00
|
|
|
|
|
|
|
-include $(DEPS)
|