diff --git a/GNUmakefile b/GNUmakefile index b7347fd..2c63104 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -17,6 +17,7 @@ BITS ?= AUTO SILENT ?= YES TERSE ?= NO STACK_PROTECT ?= NO +NEED_LIBDL ?= NO ifeq ($(OS), Windows_NT) WINDOWS ?= YES @@ -33,6 +34,10 @@ ifeq ($(OPSYS),Haiku) LDLIBS += -lnetwork endif +ifeq ($(OPSYS),Linux) +NEED_LIBDL = YES +endif + CFLAGS += -I./src/ ifeq ($(OPSYS),Windows) @@ -120,6 +125,10 @@ CFLAGS += -DSSL_SUPPORT LDLIBS += -lssl -lcrypto endif +ifeq ($(NEED_LIBDL),YES) +LDLIBS += -ldl +endif + GIT_VERSION=$(shell git describe --tags 2>/dev/null || echo "") GIT_REVISION=$(shell git show --abbrev-commit 2>/dev/null | head -n 1 | cut -f 2 -d " " || echo "") OLD_REVISION=$(shell grep GIT_REVISION revision.h 2>/dev/null | cut -f 3 -d " " | tr -d "\"")