summary refs log tree commit diff
path: root/GNUmakefile
diff options
context:
space:
mode:
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}