Makefile 664 B

123456789101112131415161718192021222324252627
  1. PKGS=sdl2 glew freetype2
  2. CFLAGS=-std=c99 -m64 -Og -ggdb \
  3. -pedantic -Wall -Wextra -Wshadow \
  4. -Wcast-align -Wunused -Wconversion -Wmisleading-indentation \
  5. -Wduplicated-cond -Wduplicated-branches -Wlogical-op \
  6. -Wdouble-promotion -Wformat=2 -Wbad-function-cast \
  7. -Wmissing-declarations -Wmissing-parameter-type \
  8. -Wmissing-prototypes -Wnested-externs -Werror \
  9. $(shell pkg-config --cflags $(PKGS))
  10. LIBS=$(shell pkg-config --libs $(PKGS)) -lm -lc
  11. SRCS=$(wildcard src/*)
  12. .PHONY: run norun
  13. norun: TAGS ged
  14. run: TAGS ged
  15. ./ged ./src/main.c
  16. ged: $(SRCS)
  17. $(CC) $(CFLAGS) -o ged src/main.c $(LIBS)
  18. TAGS: $(SRCS)
  19. exuberant-ctags --kinds-all=* --totals=yes -e -R