summaryrefslogtreecommitdiff
path: root/ZAPDTR
diff options
context:
space:
mode:
authorDavid Chavez <david@dcvz.io>2022-08-02 16:22:20 +0200
committerGitHub <noreply@github.com>2022-08-02 16:22:20 +0200
commit61c68666d622bddf1c8964cb3160ce5d0198af74 (patch)
tree9dfa9e03a168ce60373b77e6f455ec469c6acd45 /ZAPDTR
parent4ed82c71dc9e24748cb06a6c70f4d52e87372ecc (diff)
Closer align Makefiles & Dockerfiles (#748)
Diffstat (limited to 'ZAPDTR')
-rw-r--r--ZAPDTR/Makefile18
1 files changed, 12 insertions, 6 deletions
diff --git a/ZAPDTR/Makefile b/ZAPDTR/Makefile
index 6d8ba354d..660e0469c 100644
--- a/ZAPDTR/Makefile
+++ b/ZAPDTR/Makefile
@@ -48,11 +48,15 @@ endif
LDFLAGS := -Llib/libgfxd -L../libultraship -L../StormLib/build \
-pthread -lgfxd -lultraship ZAPDUtils/ZAPDUtils.a -lstorm -lbz2 -lm -ldl
+LDFLAGS += $(shell pkg-config --libs glew libpng zlib) $(shell sdl2-config --libs)
+INC += $(shell pkg-config --cflags libpng)
+
ifeq ($(UNAME), Darwin)
- LDFLAGS += $(shell pkg-config --libs glew libpng zlib) $(shell sdl2-config --libs) -framework OpenGL -framework Foundation
- INC += $(shell pkg-config --cflags libpng)
-else
- LDFLAGS += -lpng -lGL -lGLEW -lX11 -lz -lSDL2 -lpulse
+ LDFLAGS += -framework OpenGL -framework Foundation
+endif
+
+ifeq ($(UNAME), Linux)
+ LDFLAGS += $(shell pkg-config --libs x11 libpulse)
endif
# Use LLD if available. Set LLD=0 to not use it
@@ -65,10 +69,12 @@ ifneq ($(LLD),0)
endif
UNAMEM := $(shell uname -m)
-ifneq ($(UNAME), Darwin)
+ifeq ($(UNAME), Linux)
LDFLAGS += -Wl,-export-dynamic -lstdc++fs
EXPORTERS := -Wl,--whole-archive ../OTRExporter/OTRExporter/OTRExporter.a -Wl,--no-whole-archive
-else
+endif
+
+ifeq ($(UNAME), Darwin)
EXPORTERS := -Wl,-force_load ../OTRExporter/OTRExporter/OTRExporter.a
endif