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