diff options
author | cbdev <cb@cbcdn.com> | 2017-06-08 02:33:18 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2017-06-08 02:33:18 +0200 |
commit | aed37425605d73ac22ec1f8c3145486d0ec79bb3 (patch) | |
tree | e99c68f889e3cd5fd23d00b3e6a81b50b36360b5 /makefile | |
parent | 804b5c3b3abbac7b95d79bf84fabbb78d94e2c39 (diff) | |
download | midimonster-aed37425605d73ac22ec1f8c3145486d0ec79bb3.tar.gz midimonster-aed37425605d73ac22ec1f8c3145486d0ec79bb3.tar.bz2 midimonster-aed37425605d73ac22ec1f8c3145486d0ec79bb3.zip |
Move to dynamically loading backends
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -1,16 +1,26 @@ -LDLIBS = -lasound -CFLAGS = -g -Wall +.PHONY: clean +BACKENDS = artnet.so midi.so osc.so +OBJS = config.o backend.o plugin.o +PLUGINDIR = "\"./\"" -BACKENDS = artnet.o midi.o osc.o -OBJS = config.o backend.o $(BACKENDS) +LDLIBS = -lasound -ldl +CFLAGS ?= -g -Wall -midimonster: midimonster.h $(OBJS) +midimonster: CFLAGS += -rdynamic -DPLUGINS=$(PLUGINDIR) +%.so: CFLAGS += -fPIC +%.so: LDFLAGS += -shared + +%.so :: %.c %.h + $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) -all: midimonster +all: midimonster $(BACKENDS) + +midimonster: midimonster.h $(OBJS) clean: $(RM) midimonster $(RM) $(OBJS) + $(RM) $(BACKENDS) run: valgrind --leak-check=full --show-leak-kinds=all ./midimonster |