Add support for building shared libraries on Mac OS X

This commit is contained in:
Eelco Dolstra 2014-01-09 22:14:34 +01:00
parent 70d8e8fdde
commit e991ab942b
2 changed files with 21 additions and 6 deletions

5
lib.mk
View file

@ -9,6 +9,7 @@ default: all
QUIET = @
bin_SCRIPTS :=
noinst_SCRIPTS :=
OS = $(shell uname -s)
# Default installation paths.
@ -27,7 +28,9 @@ BUILD_SHARED_LIBS ?= 1
ifeq ($(BUILD_SHARED_LIBS), 1)
GLOBAL_CFLAGS += -fPIC
GLOBAL_CXXFLAGS += -fPIC
GLOBAL_LDFLAGS += -Wl,--no-copy-dt-needed-entries
ifneq ($(OS), Darwin)
GLOBAL_LDFLAGS += -Wl,--no-copy-dt-needed-entries
endif
endif