2020-02-07 22:17:53 +00:00
|
|
|
cc = clang
|
|
|
|
|
2020-02-18 21:19:32 +00:00
|
|
|
sdl_ldflags = $(shell pkg-config SDL2_ttf sdl2 --libs)
|
|
|
|
|
2020-02-07 22:17:53 +00:00
|
|
|
cflags = -g -O0 -pthread \
|
|
|
|
-Wall \
|
|
|
|
-Wshadow \
|
|
|
|
-Wno-pragma-once-outside-header \
|
|
|
|
-Wpointer-arith \
|
|
|
|
-Wstrict-prototypes \
|
|
|
|
-Wmissing-prototypes \
|
|
|
|
-Wfloat-equal \
|
|
|
|
-Werror=implicit-function-declaration
|
|
|
|
|
|
|
|
srcs = $(wildcard src/**/*.c test/*.c)
|
|
|
|
hdrs = $(wildcard **/*.h)
|
|
|
|
|
|
|
|
test_bin = axtest
|
|
|
|
|
2020-02-22 21:30:06 +00:00
|
|
|
all: TAGS ${test_bin}
|
2020-02-07 22:17:53 +00:00
|
|
|
|
2020-02-08 14:24:50 +00:00
|
|
|
clean:
|
2020-02-22 21:30:06 +00:00
|
|
|
rm -rf ${test_bin} _build TAGS
|
2020-02-09 16:59:16 +00:00
|
|
|
|
|
|
|
gen:
|
|
|
|
mkdir -p _build
|
|
|
|
racket scripts/enum.rkt src _build
|
2020-02-08 14:24:50 +00:00
|
|
|
|
2020-02-07 22:17:53 +00:00
|
|
|
${test_bin}: ${srcs} ${hdrs}
|
2020-02-18 21:19:32 +00:00
|
|
|
${cc} ${cflags} ${srcs} ${sdl_ldflags} -o ${test_bin}
|
2020-02-07 22:17:53 +00:00
|
|
|
|
2020-02-22 21:30:06 +00:00
|
|
|
TAGS:
|
|
|
|
etags ${srcs}
|
|
|
|
|
|
|
|
.PHONY: all clean gen TAGS
|