summary refs log tree commit diff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorzlago2024-09-02 11:20:02 +0200
committerzlago2024-09-02 11:20:02 +0200
commit6d30e75c7684817b9637a370f494040a1135b876 (patch)
tree2148b98728f760a726ac4e3a8b4f9c35425fc49a /GNUmakefile
parente1dbcc7c80e6930f223e4617385931aad1fff2c7 (diff)
un-copy paste some stuff
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile
index f7eb64a..8ef4aec 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -7,7 +7,7 @@ libs ::= openmpt fluidsynth
 cflags ::= -I . -g -Og ${CFLAGS}
 ldflags ::= -Wl,--rpath,'$$ORIGIN' $(addprefix -l,${libs}) ${LDFLAGS}
 
-srcs ::= $(wildcard src/modules/*.c)
+srcs ::= $(wildcard src/modules/*.c src/common/*.c)
 objs ::= $(addprefix out/,$(notdir ${srcs:.c=.o}))
 deps ::= $(addprefix out/,$(notdir ${srcs:.c=.d}))
 
@@ -30,6 +30,12 @@ out/%.o: src/modules/%.c out/%.d | out/
 out/%.d: src/modules/%.c | out/
 	${CC} ${cflags} ${CPPFLAGS} -MM -MG -MF $@ -MT "${@:.d=.o} $@" $<
 
+out/%.o: src/common/%.c out/%.d | out/
+	${CC} -c -o $@ $< ${cflags}
+
+out/%.d: src/common/%.c | out/
+	${CC} ${cflags} ${CPPFLAGS} -MM -MG -MF $@ -MT "${@:.d=.o} $@" $<
+
 out/%.o: src/%.c out/%.d | out/
 	${CC} -c -o $@ $< ${cflags}