From 519e350739f55cfd3ef8b9a97e241b61ca9ed1f9 Mon Sep 17 00:00:00 2001 From: zlago Date: Sun, 1 Sep 2024 12:57:57 +0200 Subject: libopenmpt --- GNUmakefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 09bd738..6f110de 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,11 +3,11 @@ GLAD ?= glad MKDIR ?= mkdir -p -libs ::= SDL2 +libs ::= SDL2 openmpt cflags ::= -I . -g -Og ${CFLAGS} ldflags ::= -Wl,--rpath,'$$ORIGIN' $(addprefix -l,${libs}) ${LDFLAGS} -srcs ::= $(wildcard src/*.c) +srcs ::= $(wildcard src/modules/*.c) objs ::= $(addprefix out/,$(notdir ${srcs:.c=.o})) deps ::= $(addprefix out/,$(notdir ${srcs:.c=.d})) @@ -24,13 +24,19 @@ clean: out/: ${MKDIR} $@ +out/%.o: src/modules/%.c out/%.d | out/ + ${CC} -c -o $@ $< ${cflags} + +out/%.d: src/modules/%.c | out/ + ${CC} ${cflags} ${CPPFLAGS} -MM -MG -MF $@ -MT "${@:.d=.o} $@" $< + out/%.o: src/%.c out/%.d | out/ ${CC} -c -o $@ $< ${cflags} out/%.d: src/%.c | out/ ${CC} ${cflags} ${CPPFLAGS} -MM -MG -MF $@ -MT "${@:.d=.o} $@" $< -out/mu-sdl: ${objs} | out/ +out/mu-%: out/%.o ${objs} | out/ ${CC} -o $@ $^ ${cflags} ${ldflags} include ${deps} -- cgit 1.4.1-2-gfad0