about summary refs log tree commit diff
path: root/lib.mk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-09T21·14+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-09T21·14+0100
commite991ab942b6ed1bc50a63afafe55ffe5cae8cbad (patch)
treedf439623a575e14366e84b49bd353d3f8ffe67e2 /lib.mk
parent70d8e8fdded9e21995fecc3ecc68e14cf4f53be7 (diff)
Add support for building shared libraries on Mac OS X
Diffstat (limited to 'lib.mk')
-rw-r--r--lib.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib.mk b/lib.mk
index 2d8ceef55f3e..5b0d2633cce4 100644
--- a/lib.mk
+++ b/lib.mk
@@ -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