diff options
author | cbdev <cb@cbcdn.com> | 2018-03-02 03:20:11 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2018-03-02 03:20:11 +0100 |
commit | 2dfc564edc0c89c4a8de7e384806aae5d593426d (patch) | |
tree | b1636ec14d3f35ed88b3f079e0c3d168f77b17b9 /Makefile | |
parent | be5df1c4e639ca6a7cd70a3122039a1de4588e28 (diff) | |
download | midimonster-2dfc564edc0c89c4a8de7e384806aae5d593426d.tar.gz midimonster-2dfc564edc0c89c4a8de7e384806aae5d593426d.tar.bz2 midimonster-2dfc564edc0c89c4a8de7e384806aae5d593426d.zip |
Move backend implementations to subdirectory
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 12 insertions, 20 deletions
@@ -1,36 +1,28 @@ -.PHONY: all clean run sanitize -BACKENDS = artnet.so midi.so osc.so loopback.so evdev.so sacn.so +.PHONY: all clean run sanitize backends OBJS = config.o backend.o plugin.o -PLUGINDIR = "\"./\"" +PLUGINDIR = "\"./backends/\"" CFLAGS ?= -g -Wall +LDLIBS = -ldl +CFLAGS += -DPLUGINS=$(PLUGINDIR) #CFLAGS += -DDEBUG -%.so: CFLAGS += -fPIC -%.so: LDFLAGS += -shared +LDFLAGS += -Wl,-export-dynamic -midimonster: LDLIBS = -ldl -midimonster: CFLAGS += -DPLUGINS=$(PLUGINDIR) -midimonster: LDFLAGS += -Wl,-export-dynamic -midi.so: LDLIBS = -lasound -evdev.so: CFLAGS += $(shell pkg-config --cflags libevdev) -evdev.so: LDLIBS = $(shell pkg-config --libs libevdev) +all: midimonster backends - -%.so :: %.c %.h - $(CC) $(CFLAGS) $(LDLIBS) $< -o $@ $(LDFLAGS) - -all: midimonster $(BACKENDS) +backends: + $(MAKE) -C backends midimonster: midimonster.c $(OBJS) clean: $(RM) midimonster $(RM) $(OBJS) - $(RM) $(BACKENDS) + $(MAKE) -C backends clean run: valgrind --leak-check=full --show-leak-kinds=all ./midimonster -sanitize: CC = clang -sanitize: CFLAGS = -g -Wall -Wpedantic -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -sanitize: midimonster $(BACKENDS) +sanitize: export CC = clang +sanitize: export CFLAGS = -g -Wall -Wpedantic -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer +sanitize: midimonster backends |