diff options
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile index 8ef4aec..7731554 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,16 +1,17 @@ #!/usr/bin/env -S gmake -f -GLAD ?= glad MKDIR ?= mkdir -p -libs ::= openmpt fluidsynth +libs ::= openmpt fluidsynth m cflags ::= -I . -g -Og ${CFLAGS} -ldflags ::= -Wl,--rpath,'$$ORIGIN' $(addprefix -l,${libs}) ${LDFLAGS} +ldflags = -Wl,--rpath,'$$ORIGIN' $(addprefix -l,${libs}) ${LDFLAGS} srcs ::= $(wildcard src/modules/*.c src/common/*.c) objs ::= $(addprefix out/,$(notdir ${srcs:.c=.o})) deps ::= $(addprefix out/,$(notdir ${srcs:.c=.d})) +.SECONDARY: + .PHONY: all run clean all: out/mu-SDL2 out/mu-portaudio @@ -42,6 +43,8 @@ out/%.o: src/%.c out/%.d | out/ out/%.d: src/%.c | out/ ${CC} ${cflags} ${CPPFLAGS} -MM -MG -MF $@ -MT "${@:.d=.o} $@" $< +out/mu-portaudio: libs += asound + out/mu-%: out/%.o ${objs} | out/ ${CC} -o $@ $^ ${cflags} ${ldflags} -l${<:out/%.o=%} |