aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/Makefile
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-03-24 19:22:30 +0100
committercbdev <cb@cbcdn.com>2019-03-24 19:22:30 +0100
commit1ed17293bedaf5bf5182d863cd406d7eb66b4501 (patch)
treec62b03610f95fa8340dfa245c31f0d2072452b42 /backends/Makefile
parentfa8f005a6c97480a671146c483cf1183d5f1b083 (diff)
downloadmidimonster-1ed17293bedaf5bf5182d863cd406d7eb66b4501.tar.gz
midimonster-1ed17293bedaf5bf5182d863cd406d7eb66b4501.tar.bz2
midimonster-1ed17293bedaf5bf5182d863cd406d7eb66b4501.zip
Factor out socket operations (Fixes #13)
Diffstat (limited to 'backends/Makefile')
-rw-r--r--backends/Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/backends/Makefile b/backends/Makefile
index aef39c4..a7ea35a 100644
--- a/backends/Makefile
+++ b/backends/Makefile
@@ -2,6 +2,7 @@
OPTIONAL_BACKENDS = ola.so
LINUX_BACKENDS = midi.so evdev.so
BACKENDS = artnet.so osc.so loopback.so sacn.so
+BACKEND_LIB = libmmbackend.o
SYSTEM := $(shell uname -s)
@@ -18,6 +19,9 @@ ifeq ($(SYSTEM),Darwin)
LDFLAGS += -undefined dynamic_lookup
endif
+artnet.so: ADDITIONAL_OBJS += $(BACKEND_LIB)
+osc.so: ADDITIONAL_OBJS += $(BACKEND_LIB)
+sacn.so: ADDITIONAL_OBJS += $(BACKEND_LIB)
midi.so: LDLIBS = -lasound
evdev.so: CFLAGS += $(shell pkg-config --cflags libevdev)
evdev.so: LDLIBS = $(shell pkg-config --libs libevdev)
@@ -25,14 +29,14 @@ ola.so: LDLIBS = -lola
ola.so: CPPFLAGS += -Wno-write-strings
%.so :: %.c %.h
- $(CC) $(CFLAGS) $(LDLIBS) $< -o $@ $(LDFLAGS)
+ $(CC) $(CFLAGS) $(LDLIBS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS)
%.so :: %.cpp %.h
- $(CXX) $(CPPFLAGS) $(LDLIBS) $< -o $@ $(LDFLAGS)
+ $(CXX) $(CPPFLAGS) $(LDLIBS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS)
-all: $(BACKENDS)
+all: $(BACKEND_LIB) $(BACKENDS)
-full: $(BACKENDS) $(OPTIONAL_BACKENDS)
+full: $(BACKEND_LIB) $(BACKENDS) $(OPTIONAL_BACKENDS)
clean:
- $(RM) $(BACKENDS) $(OPTIONAL_BACKENDS)
+ $(RM) $(BACKEND_LIB) $(BACKENDS) $(OPTIONAL_BACKENDS)