From 4f467a30f88a628e0e49858986d9278e12a92ce5 Mon Sep 17 00:00:00 2001 From: cbdev Date: Fri, 1 May 2020 16:49:49 +0200 Subject: Implement wininput skeleton and mouse output --- backends/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index 700c9b3..9b66728 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -1,6 +1,6 @@ .PHONY: all clean full LINUX_BACKENDS = midi.so evdev.so -WINDOWS_BACKENDS = artnet.dll osc.dll loopback.dll sacn.dll maweb.dll winmidi.dll openpixelcontrol.dll rtpmidi.dll +WINDOWS_BACKENDS = artnet.dll osc.dll loopback.dll sacn.dll maweb.dll winmidi.dll openpixelcontrol.dll rtpmidi.dll wininput.dll BACKENDS = artnet.so osc.so loopback.so sacn.so lua.so maweb.so jack.so openpixelcontrol.so python.so rtpmidi.so OPTIONAL_BACKENDS = ola.so BACKEND_LIB = libmmbackend.o -- cgit v1.2.3 From 9b9256b55ec4f61f14d5199be2a010ad3aeb1896 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 10 May 2020 12:58:52 +0200 Subject: Refactor wininput channel parsing, implement basic joystick queries --- backends/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index 9b66728..dbb9f55 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -53,6 +53,8 @@ rtpmidi.dll: LDLIBS += -lws2_32 -liphlpapi winmidi.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) winmidi.dll: LDLIBS += -lwinmm -lws2_32 +wininput.dll: LDLIBS += -lwinmm + jack.so: LDLIBS = -ljack -lpthread midi.so: LDLIBS = -lasound evdev.so: CFLAGS += $(shell pkg-config --cflags libevdev || echo "-DBUILD_ERROR=\"Missing pkg-config data for libevdev\"") -- cgit v1.2.3 From 4e5cc42d2eb245bfd2ac616ca6898e4855ec5363 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sat, 27 Jun 2020 19:26:26 +0200 Subject: Remove manually built backends with clean target --- backends/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index dbb9f55..09f5b96 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -3,6 +3,7 @@ LINUX_BACKENDS = midi.so evdev.so WINDOWS_BACKENDS = artnet.dll osc.dll loopback.dll sacn.dll maweb.dll winmidi.dll openpixelcontrol.dll rtpmidi.dll wininput.dll BACKENDS = artnet.so osc.so loopback.so sacn.so lua.so maweb.so jack.so openpixelcontrol.so python.so rtpmidi.so OPTIONAL_BACKENDS = ola.so +MANUAL_BACKENDS = lua.dll BACKEND_LIB = libmmbackend.o SYSTEM := $(shell uname -s) @@ -97,4 +98,4 @@ windows: ../libmmapi.a $(BACKEND_LIB) $(WINDOWS_BACKENDS) full: $(BACKEND_LIB) $(BACKENDS) $(OPTIONAL_BACKENDS) clean: - $(RM) $(BACKEND_LIB) $(BACKENDS) $(OPTIONAL_BACKENDS) $(WINDOWS_BACKENDS) + $(RM) $(BACKEND_LIB) $(BACKENDS) $(OPTIONAL_BACKENDS) $(WINDOWS_BACKENDS) $(MANUAL_BACKENDS) -- cgit v1.2.3 From 690aec061db4cfab50b998822628f732e115e11e Mon Sep 17 00:00:00 2001 From: cbdev Date: Sat, 15 Aug 2020 11:15:01 +0200 Subject: Improve some documentation --- backends/Makefile | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index 09f5b96..4f89b43 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -1,17 +1,26 @@ .PHONY: all clean full +# Backends that can only be built on Linux LINUX_BACKENDS = midi.so evdev.so -WINDOWS_BACKENDS = artnet.dll osc.dll loopback.dll sacn.dll maweb.dll winmidi.dll openpixelcontrol.dll rtpmidi.dll wininput.dll -BACKENDS = artnet.so osc.so loopback.so sacn.so lua.so maweb.so jack.so openpixelcontrol.so python.so rtpmidi.so +# Backends that can only be built on Windows (mostly due to the .DLL extension) +WINDOWS_BACKENDS = artnet.dll osc.dll loopback.dll sacn.dll maweb.dll winmidi.dll openpixelcontrol.dll rtpmidi.dll wininput.dll visca.dll +# Backends that can be built on any platform that can load .SO libraries +BACKENDS = artnet.so osc.so loopback.so sacn.so lua.so maweb.so jack.so openpixelcontrol.so python.so rtpmidi.so visca.so +# Backends that require huge dependencies to be installed OPTIONAL_BACKENDS = ola.so +# Backends that need to be built manually (but still should be included in the clean target) MANUAL_BACKENDS = lua.dll + +# The backend library, providing platform-independent abstractions for common things BACKEND_LIB = libmmbackend.o +# Evaluate which system we are on SYSTEM := $(shell uname -s) # Generate debug symbols unless overridden CFLAGS ?= -g CPPFLAGS ?= -g +# All backends are shared libraries CFLAGS += -fPIC -I../ -Wall -Wpedantic CPPFLAGS += -fPIC -I../ LDFLAGS += -shared @@ -25,6 +34,7 @@ ifeq ($(SYSTEM),Darwin) LDFLAGS += -undefined dynamic_lookup endif +# Most of these next few backends just pull in the backend lib, some set additional flags artnet.so: ADDITIONAL_OBJS += $(BACKEND_LIB) artnet.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) artnet.dll: LDLIBS += -lws2_32 @@ -37,6 +47,10 @@ sacn.so: ADDITIONAL_OBJS += $(BACKEND_LIB) sacn.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) sacn.dll: LDLIBS += -lws2_32 +visca.so: ADDITIONAL_OBJS += $(BACKEND_LIB) +visca.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) +visca.dll: LDLIBS += -lws2_32 + openpixelcontrol.so: ADDITIONAL_OBJS += $(BACKEND_LIB) openpixelcontrol.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) openpixelcontrol.dll: LDLIBS += -lws2_32 @@ -73,6 +87,7 @@ lua.dll: LDLIBS += -L../ -llua53 python.so: CFLAGS += $(shell pkg-config --cflags python3 || pkg-config --cflags python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") python.so: CFLAGS += $(shell pkg-config --libs python3 || pkg-config --libs python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") +# Generic rules on how to build .SO/.DLL's from C and CPP sources %.so :: %.c %.h $(BACKEND_LIB) $(CC) $(CFLAGS) $(LDLIBS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS) @@ -82,11 +97,14 @@ python.so: CFLAGS += $(shell pkg-config --libs python3 || pkg-config --libs pyth %.so :: %.cpp %.h $(CXX) $(CPPFLAGS) $(LDLIBS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS) +# This is the actual first named target, and thus the default all: $(BACKEND_LIB) $(BACKENDS) +# Build an import lib for the windows build if it's not already there ../libmmapi.a: $(MAKE) -C ../ midimonster.exe +# Override a bunch of stuff for the windows target and it's DLL dependencies %.dll: export CC = x86_64-w64-mingw32-gcc %.dll: LDLIBS += -lmmapi %.dll: LDFLAGS += -L../ @@ -95,7 +113,9 @@ windows: CFLAGS += -Wno-format -Wno-pointer-sign windows: export CC = x86_64-w64-mingw32-gcc windows: ../libmmapi.a $(BACKEND_LIB) $(WINDOWS_BACKENDS) +# Optional target including the backends that require large dependencies full: $(BACKEND_LIB) $(BACKENDS) $(OPTIONAL_BACKENDS) +# Clean up all generated files clean: $(RM) $(BACKEND_LIB) $(BACKENDS) $(OPTIONAL_BACKENDS) $(WINDOWS_BACKENDS) $(MANUAL_BACKENDS) -- cgit v1.2.3 From bb122923379f3439c62241652b82ed403ad835f7 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sat, 24 Oct 2020 12:31:27 +0200 Subject: Add generic lua pkg-config data --- backends/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index 4f89b43..d815f84 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -79,9 +79,9 @@ ola.so: CPPFLAGS += -Wno-write-strings # The pkg-config name for liblua5.3 is subject to discussion. I prefer 'lua5.3' (which works on Debian and OSX), # but Arch requires 'lua53' which works on Debian, too, but breaks on OSX. -lua.so: CFLAGS += $(shell pkg-config --cflags lua53 || pkg-config --cflags lua5.3 || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"") -lua.so: LDLIBS += $(shell pkg-config --libs lua53 || pkg-config --libs lua5.3 || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"") -lua.dll: CFLAGS += $(shell pkg-config --cflags lua53 || pkg-config --cflags lua5.3 || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"") +lua.so: CFLAGS += $(shell pkg-config --cflags lua53 || pkg-config --cflags lua5.3 || pkg-config --cflags lua || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"") +lua.so: LDLIBS += $(shell pkg-config --libs lua53 || pkg-config --libs lua5.3 || pkg-config --libs lua || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"") +lua.dll: CFLAGS += $(shell pkg-config --cflags lua53 || pkg-config --cflags lua5.3 || pkg-config --cflags lua || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"") lua.dll: LDLIBS += -L../ -llua53 python.so: CFLAGS += $(shell pkg-config --cflags python3 || pkg-config --cflags python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") -- cgit v1.2.3 From 378c38aee6dae85c75be924e04f0ba5f90145518 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 6 Dec 2020 17:11:46 +0100 Subject: Add MQTT backend to backend makefile --- backends/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index d815f84..aa9c988 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -2,9 +2,9 @@ # Backends that can only be built on Linux LINUX_BACKENDS = midi.so evdev.so # Backends that can only be built on Windows (mostly due to the .DLL extension) -WINDOWS_BACKENDS = artnet.dll osc.dll loopback.dll sacn.dll maweb.dll winmidi.dll openpixelcontrol.dll rtpmidi.dll wininput.dll visca.dll +WINDOWS_BACKENDS = artnet.dll osc.dll loopback.dll sacn.dll maweb.dll winmidi.dll openpixelcontrol.dll rtpmidi.dll wininput.dll visca.dll mqtt.dll # Backends that can be built on any platform that can load .SO libraries -BACKENDS = artnet.so osc.so loopback.so sacn.so lua.so maweb.so jack.so openpixelcontrol.so python.so rtpmidi.so visca.so +BACKENDS = artnet.so osc.so loopback.so sacn.so lua.so maweb.so jack.so openpixelcontrol.so python.so rtpmidi.so visca.so mqtt.so # Backends that require huge dependencies to be installed OPTIONAL_BACKENDS = ola.so # Backends that need to be built manually (but still should be included in the clean target) @@ -51,6 +51,10 @@ visca.so: ADDITIONAL_OBJS += $(BACKEND_LIB) visca.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) visca.dll: LDLIBS += -lws2_32 +mqtt.so: ADDITIONAL_OBJS += $(BACKEND_LIB) +mqtt.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) +mqtt.dll: LDLIBS += -lws2_32 + openpixelcontrol.so: ADDITIONAL_OBJS += $(BACKEND_LIB) openpixelcontrol.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) openpixelcontrol.dll: LDLIBS += -lws2_32 -- cgit v1.2.3 From a89dcd7942958e0ebe5881dde4820ceb77d29e9b Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 23 Jun 2021 22:27:15 +0200 Subject: Fix build with recent environments, fix Coverity CID 371602 and 355842 --- backends/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index aa9c988..4697a5a 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -60,7 +60,7 @@ openpixelcontrol.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) openpixelcontrol.dll: LDLIBS += -lws2_32 maweb.so: ADDITIONAL_OBJS += $(BACKEND_LIB) -maweb.so: LDLIBS = -lssl +maweb.so: LDLIBS = $(shell pkg-config --libs openssl || echo "-DBUILD_ERROR=\"Missing pkg-config data for openssl\"") maweb.dll: ADDITIONAL_OBJS += $(BACKEND_LIB) maweb.dll: LDLIBS += -lws2_32 maweb.dll: CFLAGS += -DMAWEB_NO_LIBSSL @@ -88,18 +88,20 @@ lua.so: LDLIBS += $(shell pkg-config --libs lua53 || pkg-config --libs lua5.3 || lua.dll: CFLAGS += $(shell pkg-config --cflags lua53 || pkg-config --cflags lua5.3 || pkg-config --cflags lua || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"") lua.dll: LDLIBS += -L../ -llua53 -python.so: CFLAGS += $(shell pkg-config --cflags python3 || pkg-config --cflags python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") -python.so: CFLAGS += $(shell pkg-config --libs python3 || pkg-config --libs python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") +# Python seems to ship their own little python3-config tool instead of properly maintaining their pkg-config files. +# This one also spams a good deal of unwanted flags into CFLAGS, so we use only --includes and --libs +python.so: CFLAGS += $(shell python3-config --includes || pkg-config --cflags python3 || pkg-config --cflags python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") +python.so: LDLIBS += $(shell python3-config --libs || pkg-config --libs python3 || pkg-config --libs python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") # Generic rules on how to build .SO/.DLL's from C and CPP sources %.so :: %.c %.h $(BACKEND_LIB) - $(CC) $(CFLAGS) $(LDLIBS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS) + $(CC) $(CFLAGS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS) $(LDLIBS) %.dll :: %.c %.h $(BACKEND_LIB) $(CC) $(CFLAGS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS) $(LDLIBS) %.so :: %.cpp %.h - $(CXX) $(CPPFLAGS) $(LDLIBS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS) + $(CXX) $(CPPFLAGS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS) $(LDLIBS) # This is the actual first named target, and thus the default all: $(BACKEND_LIB) $(BACKENDS) -- cgit v1.2.3 From f646d10ae1c7f9df1cc91243d7166d74791b487b Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 23 Jun 2021 22:41:23 +0200 Subject: Prefer pkg-config over python3-config for linker info --- backends/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index 4697a5a..5054236 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -89,9 +89,10 @@ lua.dll: CFLAGS += $(shell pkg-config --cflags lua53 || pkg-config --cflags lua5 lua.dll: LDLIBS += -L../ -llua53 # Python seems to ship their own little python3-config tool instead of properly maintaining their pkg-config files. -# This one also spams a good deal of unwanted flags into CFLAGS, so we use only --includes and --libs +# This one also spams a good deal of unwanted flags into CFLAGS, so we use only --includes. On the other hand, the --libs +# info from this one seems to include the actual interpreter library only on some systems, which makes it worse than useless. python.so: CFLAGS += $(shell python3-config --includes || pkg-config --cflags python3 || pkg-config --cflags python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") -python.so: LDLIBS += $(shell python3-config --libs || pkg-config --libs python3 || pkg-config --libs python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") +python.so: LDLIBS += $(shell pkg-config --libs python3-embed || python3-config --libs || pkg-config --libs python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") # Generic rules on how to build .SO/.DLL's from C and CPP sources %.so :: %.c %.h $(BACKEND_LIB) -- cgit v1.2.3 From 011be343cd1427a1be68f9a0da38401b89de0fec Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 27 Jun 2021 16:20:52 +0200 Subject: Fix python backend calls --- backends/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index 5054236..6c46007 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -92,7 +92,7 @@ lua.dll: LDLIBS += -L../ -llua53 # This one also spams a good deal of unwanted flags into CFLAGS, so we use only --includes. On the other hand, the --libs # info from this one seems to include the actual interpreter library only on some systems, which makes it worse than useless. python.so: CFLAGS += $(shell python3-config --includes || pkg-config --cflags python3 || pkg-config --cflags python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") -python.so: LDLIBS += $(shell pkg-config --libs python3-embed || python3-config --libs || pkg-config --libs python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") +python.so: LDLIBS += $(shell pkg-config --libs python3-embed || python3-config --libs || pkg-config --libs python3 || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") # Generic rules on how to build .SO/.DLL's from C and CPP sources %.so :: %.c %.h $(BACKEND_LIB) -- cgit v1.2.3 From 979ca16917cfca16b42f6f0464ff6c5cd41473b1 Mon Sep 17 00:00:00 2001 From: cbdev Date: Mon, 28 Jun 2021 22:30:02 +0200 Subject: Improve windows build --- backends/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backends/Makefile') diff --git a/backends/Makefile b/backends/Makefile index 6c46007..be870d6 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -93,6 +93,9 @@ lua.dll: LDLIBS += -L../ -llua53 # info from this one seems to include the actual interpreter library only on some systems, which makes it worse than useless. python.so: CFLAGS += $(shell python3-config --includes || pkg-config --cflags python3 || pkg-config --cflags python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") python.so: LDLIBS += $(shell pkg-config --libs python3-embed || python3-config --libs || pkg-config --libs python3 || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") +python.so: LDFLAGS += $(shell python3-config --ldflags || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") +python.dll: CFLAGS += $(shell python3-config --includes || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"") +python.dll: LDLIBS += -L../ -lpython3 # Generic rules on how to build .SO/.DLL's from C and CPP sources %.so :: %.c %.h $(BACKEND_LIB) -- cgit v1.2.3