diff options
author | zlago | 2024-09-25 14:02:49 +0200 |
---|---|---|
committer | zlago | 2024-09-25 14:19:32 +0200 |
commit | 9942429dbb83fed5532c070f8afe41d6ddcd66d2 (patch) | |
tree | 70f7d3872de143a7f256b3913e2bf52724d23c3a /GNUmakefile | |
parent | b23a3ab831f91553d34a48f51370ed9525de07ac (diff) |
parallax
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/GNUmakefile b/GNUmakefile index 39fcc6d..c2238d8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -5,14 +5,14 @@ export MKDIR ?= mkdir -p libs := SDL2 z CFLAGS ?= -Wall -Wpedantic -g -Og -cflags := -I lib/ -I . ${CFLAGS} +cflags := ${CFLAGS} ldflags := $(addprefix -l,${libs}) ${LDFLAGS} srcs := $(wildcard src/*.c) objs := $(addprefix out/${NS}/,$(notdir ${srcs:.c=.o})) deps := $(addprefix out/${NS}/,$(notdir $(patsubst %.c,%.d,$(wildcard src/*.c)))) -.PHONY: all run clean lib +.PHONY: all run clean all: out/${NS}/a.out @@ -21,10 +21,6 @@ run: out/${NS}/a.out clean: ${RM} -r out/${NS}/ -# ${MAKE} -C lib clean - -#lib: -# ${MAKE} -C $@ out/${NS}/: ${MKDIR} $@ @@ -35,13 +31,15 @@ out/: out/${NS}/%.o: src/%.c out/${NS}/%.d | out/${NS}/ ${CC} -c -o $@ $< ${cflags} +out/${NS}/incbin.o: src/incbin.s | out/${NS}/ + ${CC} -c -o $@ $< -Wa,-I,src/ ${cflags} + out/${NS}/%.d: src/%.c | out/${NS}/ ${CC} ${cflags} ${CPPFLAGS} -MM -MG -MF $@ -MT "${@:.d=.o} $@" $< -out/${NS}/a.out: ${objs} | out/${NS}/ #lib - ${CC} -o $@ $^ $(wildcard lib/out/*.o) ${cflags} ${ldflags} +out/${NS}/a.out: ${objs} out/${NS}/incbin.o | out/${NS}/ + ${CC} -o $@ $^ ${cflags} ${ldflags} -out/%: utl/%.c | out/${NS}/ - ${CC} -g -Og -o $@ $^ # i have no idea how im supposed to handle CFLAGS +include $(wildcard utl/*.mk) include ${deps} |