blues/Makefile

28 lines
716 B
Makefile
Raw Normal View History

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
BB_SRCS := $(foreach f,$(BB),bb/$f)
JA_SRCS := $(foreach f,$(JA),ja/$f)
SRCS := $(BB_SRCS) $(JA_SRCS)
2018-07-08 16:08:53 +02:00
OBJS := $(SRCS:.c=.o)
DEPS := $(SRCS:.c=.d)
2018-12-16 13:34:03 +01:00
CPPFLAGS := -Wall -Wpedantic -MMD $(SDL_CFLAGS) -I. -g
all: blues bbja
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
clean:
2018-12-16 13:34:03 +01:00
rm -f $(OBJS) $(DEPS)
2018-07-08 16:08:53 +02:00
-include $(DEPS)