diff options
author | cbdev <cb@cbcdn.com> | 2019-12-31 10:58:34 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-12-31 10:58:34 +0100 |
commit | 3b4a2f9f3bbe97c5b77eb74ba9c0163b52d33206 (patch) | |
tree | 1defeeb5b081b8c951d920298fa10858191d6beb /backends/Makefile | |
parent | 7360766777a7969b76fa306f7381d2d51efa1ebe (diff) | |
parent | 87fe68ef7d929b2f79e695df649b374fe0e2c572 (diff) | |
download | midimonster-3b4a2f9f3bbe97c5b77eb74ba9c0163b52d33206.tar.gz midimonster-3b4a2f9f3bbe97c5b77eb74ba9c0163b52d33206.tar.bz2 midimonster-3b4a2f9f3bbe97c5b77eb74ba9c0163b52d33206.zip |
Merge branch 'master' into debian/master
Diffstat (limited to 'backends/Makefile')
-rw-r--r-- | backends/Makefile | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/backends/Makefile b/backends/Makefile index feefd7b..656e6b6 100644 --- a/backends/Makefile +++ b/backends/Makefile @@ -7,8 +7,12 @@ BACKEND_LIB = libmmbackend.o SYSTEM := $(shell uname -s) -CFLAGS += -g -fPIC -I../ -Wall -Wpedantic -CPPFLAGS += -g -fPIC -I../ +# Generate debug symbols unless overridden +CFLAGS ?= -g +CPPFLAGS ?= -g + +CFLAGS += -fPIC -I../ -Wall -Wpedantic +CPPFLAGS += -fPIC -I../ LDFLAGS += -shared # Build Linux backends if possible @@ -47,10 +51,13 @@ evdev.so: CFLAGS += $(shell pkg-config --cflags libevdev || echo "-DBUILD_ERROR= evdev.so: LDLIBS = $(shell pkg-config --libs libevdev || echo "-DBUILD_ERROR=\"Missing pkg-config data for libevdev\"") ola.so: LDLIBS = -lola 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.dll: LDLIBS += -L../libs -llua53 %.so :: %.c %.h $(BACKEND_LIB) $(CC) $(CFLAGS) $(LDLIBS) $< $(ADDITIONAL_OBJS) -o $@ $(LDFLAGS) @@ -66,10 +73,12 @@ all: $(BACKEND_LIB) $(BACKENDS) ../libmmapi.a: $(MAKE) -C ../ midimonster.exe -windows: export CC = x86_64-w64-mingw32-gcc -windows: LDLIBS += -lmmapi -windows: LDFLAGS += -L../ +%.dll: export CC = x86_64-w64-mingw32-gcc +%.dll: LDLIBS += -lmmapi +%.dll: LDFLAGS += -L../ +%.dll: CFLAGS += -Wno-format -Wno-pointer-sign windows: CFLAGS += -Wno-format -Wno-pointer-sign +windows: export CC = x86_64-w64-mingw32-gcc windows: ../libmmapi.a $(BACKEND_LIB) $(WINDOWS_BACKENDS) full: $(BACKEND_LIB) $(BACKENDS) $(OPTIONAL_BACKENDS) |