Commit 3e2ebd3b471cdbb4f196eeedf397842e02764b17

Steffen Jaeckel 2017-08-29T10:29:58

auto-determine correct libtool binary for MacOS This fixes #83

diff --git a/makefile.shared b/makefile.shared
index 8f0e4ea..2805fc5 100644
--- a/makefile.shared
+++ b/makefile.shared
@@ -9,7 +9,16 @@ endif
 
 include makefile_include.mk
 
-LT	?= libtool
+
+PLATFORM := $(shell uname | sed -e 's/_.*//')
+
+ifndef LT
+  ifeq ($(PLATFORM), Darwin)
+    LT:=glibtool
+  else
+    LT:=libtool
+  endif
+endif
 LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
 
 LCOV_ARGS=--directory .libs --directory .