.PHONY: all all: @echo 'Running build.sh' @./build.sh @ctags --recurse #SRCS=$(shell find ./src -name '*.c' -type f) #OBJS=$(patsubst %.c, %.o, ${SRCS}) #DEPS=$(patsubst %.c, %.d, ${SRCS}) #HDRS=$(shell find ./src -name '*.h' -type f) #PRECOMPS=$(patsubst %.h, %.I, ${HDRS}) # #CFLAGS+=-ansi -m64 -Og -ggdb \ #-pedantic -Wall -Wextra -Wshadow \ #-Wcast-align -Wunused -Wconversion -Wmisleading-indentation \ #-Wdouble-promotion -Wformat=2 -Wbad-function-cast \ #-Wmissing-declarations \ #-Wmissing-prototypes -Wnested-externs -Werror # #LDFLAGS+=-fsanitize=address # #ifneq ($(findstring -static, ${LDFLAGS}), ) # LDFLAGS:=$(filter-out -fsanitize=address, ${LDFLAGS}) # _PKGT_STATIC:=--static #endif # #BIN := $(subst src/,,$(patsubst %.c, %, ${SRCS})) # ##tt: tt.o # #a.out: first.o src/lib.h # @echo -n "[LD] " # gcc ${LDFLAGS} ${_LDFLAGS_$@} $^ -o $@ # #first.o: src/lib.h # #sdl3: CFLAGS+=$(shell pkg-config ${_PKG_STATIC} --cflags sdl3) #sdl3: LDFLAGS+=$(shell pkg-config ${_PKG_STATIC} --libs sdl3) # #rl: CFLAGS+=-I./raylib-5.5_linux_amd64/include -std=c99 #rl: LDFLAGS+=-L./raylib-5.5_linux_amd64/lib -lraylib -Wl,-rpath=./raylib-5.5_linux_amd64/lib # #ged: CFLAGS+=-I./raylib-5.5_linux_amd64/include -std=c89 #ged: LDFLAGS+= -L./raylib-5.5_linux_amd64/lib -lraylib -Wl,-rpath=./raylib-5.5_linux_amd64/lib # #raw_x11: CFLAGS+=$(shell pkg-config ${_PKG_STATIC} --cflags x11) #raw_x11: LDFLAGS+=$(shell pkg-config ${_PKG_STATIC} --libs x11) # #cad: CFLAGS+=$(shell pkg-config ${_PKG_STATIC} --cflags x11) #cad: LDFLAGS+=$(shell pkg-config ${_PKG_STATIC} --libs x11) # #gui: CFLAGS+=-I./raylib-5.5_linux_amd64/include -std=c99 #gui: LDFLAGS+=-L./raylib-5.5_linux_amd64/lib -lraylib -Wl,-rpath=./raylib-5.5_linux_amd64/lib # #all: tags ${BIN} # #${BIN}: %: src/%.o # @echo -n "[LD] " # gcc ${LDFLAGS} ${_LDFLAGS_$@} $^ -o $@ # #%.d: %.c # gcc ${CFLAGS} -MM $^ > $@ # #%.I: %.h # gcc ${CFLAGS} -DIMP -E $^ -o $@ # #include ${DEPS} # #tags: ${SRCS} ${HDRS} ${PRECOMPS} # @ctags -D IMP --kinds-all=* $^ # #clean: # rm -fv ${BIN} ${OBJS} # #fullclean: clean # rm -fv ${DEPS}