From 3dad4173e7a5520e014e738a78b38a67ac6f0f9e Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Mon, 17 Oct 2022 12:11:23 +0200 Subject: [PATCH] Do not link against libdl on OpenBSD --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b3d7a92..0acf49e 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,15 @@ else CXXFLAGS += -D NDEBUG -O3 endif -LDLIBS := -lm -lscgui -lSDL2 -lcairo -lscerror -lscstring -lscscreensaver -ldl -lscnumerics +LDLIBS := -lm -lscgui -lSDL2 -lcairo -lscerror -lscstring -lscscreensaver -lscnumerics +UNAME_S := $(shell uname -s) + +ifeq ($(UNAME_S),Darwin) + LDLIBS += -ldl +endif +ifeq ($(UNAME_S),Linux) + LDLIBS += -ldl +endif .PHONY: all clean install modules new