Makefile 2.0 KB

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