36 lines
621 B
Makefile
36 lines
621 B
Makefile
cc = clang
|
|
|
|
sdl_ldflags = $(shell pkg-config SDL2_ttf sdl2 --libs)
|
|
|
|
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
|
|
|
|
all: TAGS ${test_bin}
|
|
|
|
clean:
|
|
rm -rf ${test_bin} _build TAGS
|
|
|
|
gen:
|
|
mkdir -p _build
|
|
racket scripts/enum.rkt src _build
|
|
|
|
${test_bin}: ${srcs} ${hdrs}
|
|
${cc} ${cflags} ${srcs} ${sdl_ldflags} -o ${test_bin}
|
|
|
|
TAGS:
|
|
etags ${srcs}
|
|
|
|
.PHONY: all clean gen TAGS
|