Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. .PHONY: all
  2. all:
  3. @echo 'Running build.sh'
  4. @./build.sh
  5. @ctags --recurse
  6. #SRCS=$(shell find ./src -name '*.c' -type f)
  7. #OBJS=$(patsubst %.c, %.o, ${SRCS})
  8. #DEPS=$(patsubst %.c, %.d, ${SRCS})
  9. #HDRS=$(shell find ./src -name '*.h' -type f)
  10. #PRECOMPS=$(patsubst %.h, %.I, ${HDRS})
  11. #
  12. #CFLAGS+=-ansi -m64 -Og -ggdb \
  13. #-pedantic -Wall -Wextra -Wshadow \
  14. #-Wcast-align -Wunused -Wconversion -Wmisleading-indentation \
  15. #-Wdouble-promotion -Wformat=2 -Wbad-function-cast \
  16. #-Wmissing-declarations \
  17. #-Wmissing-prototypes -Wnested-externs -Werror
  18. #
  19. #LDFLAGS+=-fsanitize=address
  20. #
  21. #ifneq ($(findstring -static, ${LDFLAGS}), )
  22. # LDFLAGS:=$(filter-out -fsanitize=address, ${LDFLAGS})
  23. # _PKGT_STATIC:=--static
  24. #endif
  25. #
  26. #BIN := $(subst src/,,$(patsubst %.c, %, ${SRCS}))
  27. #
  28. ##tt: tt.o
  29. #
  30. #a.out: first.o src/lib.h
  31. # @echo -n "[LD] "
  32. # gcc ${LDFLAGS} ${_LDFLAGS_$@} $^ -o $@
  33. #
  34. #first.o: src/lib.h
  35. #
  36. #sdl3: CFLAGS+=$(shell pkg-config ${_PKG_STATIC} --cflags sdl3)
  37. #sdl3: LDFLAGS+=$(shell pkg-config ${_PKG_STATIC} --libs sdl3)
  38. #
  39. #rl: CFLAGS+=-I./raylib-5.5_linux_amd64/include -std=c99
  40. #rl: LDFLAGS+=-L./raylib-5.5_linux_amd64/lib -lraylib -Wl,-rpath=./raylib-5.5_linux_amd64/lib
  41. #
  42. #ged: CFLAGS+=-I./raylib-5.5_linux_amd64/include -std=c89
  43. #ged: LDFLAGS+= -L./raylib-5.5_linux_amd64/lib -lraylib -Wl,-rpath=./raylib-5.5_linux_amd64/lib
  44. #
  45. #raw_x11: CFLAGS+=$(shell pkg-config ${_PKG_STATIC} --cflags x11)
  46. #raw_x11: LDFLAGS+=$(shell pkg-config ${_PKG_STATIC} --libs x11)
  47. #
  48. #cad: CFLAGS+=$(shell pkg-config ${_PKG_STATIC} --cflags x11)
  49. #cad: LDFLAGS+=$(shell pkg-config ${_PKG_STATIC} --libs x11)
  50. #
  51. #gui: CFLAGS+=-I./raylib-5.5_linux_amd64/include -std=c99
  52. #gui: LDFLAGS+=-L./raylib-5.5_linux_amd64/lib -lraylib -Wl,-rpath=./raylib-5.5_linux_amd64/lib
  53. #
  54. #all: tags ${BIN}
  55. #
  56. #${BIN}: %: src/%.o
  57. # @echo -n "[LD] "
  58. # gcc ${LDFLAGS} ${_LDFLAGS_$@} $^ -o $@
  59. #
  60. #%.d: %.c
  61. # gcc ${CFLAGS} -MM $^ > $@
  62. #
  63. #%.I: %.h
  64. # gcc ${CFLAGS} -DIMP -E $^ -o $@
  65. #
  66. #include ${DEPS}
  67. #
  68. #tags: ${SRCS} ${HDRS} ${PRECOMPS}
  69. # @ctags -D IMP --kinds-all=* $^
  70. #
  71. #clean:
  72. # rm -fv ${BIN} ${OBJS}
  73. #
  74. #fullclean: clean
  75. # rm -fv ${DEPS}