Makefile 598 B

123456789101112131415161718
  1. SRCS=$(shell find ./src -name '*.c' -type f)
  2. HDRS=$(shell find ./src -name '*.h' -type f)
  3. CFLAGS=-ansi -m64 -Og -fsanitize=address -ggdb \
  4. -pedantic -Wall -Wextra -Wshadow \
  5. -Wcast-align -Wunused -Wconversion -Wmisleading-indentation \
  6. -Wdouble-promotion -Wformat=2 -Wbad-function-cast \
  7. -Wmissing-declarations \
  8. -Wmissing-prototypes -Wnested-externs -Werror
  9. sdl3: src/sdl3.c ${HDRS}
  10. gcc $(shell pkg-config --cflags sdl3) $(shell pkg-config --libs sdl3) -ggdb ${CFLAGS} $^ -o $@
  11. cint: src/cint.c ${HDRS}
  12. gcc -ggdb ${CFLAGS} $^ -o $@
  13. tags: ${SRCS} ${HDRS}
  14. ctags --kinds-all=* --totals=yes $^