summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/build/Makefile b/build/Makefile
index bb743173..d91d54b6 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -1,5 +1,18 @@
LIBCLANG_PATH=/usr/lib
+DYLIB_EXT=.so
+
+ifeq ($(OS),Windows_NT)
+ # Not sure where default location is on windows
+ DYLIB_EXT=.dll
+else
+ UNAME_S := $(shell uname -s)
+ ifeq ($(UNAME_S),Darwin)
+ LIBCLANG_PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
+ DYLIB_EXT=.dylib
+ endif
+endif
all:
- ln -sf $(LIBCLANG_PATH)/libclang.so $(OUT_DIR)
- ln -sf $(LIBCLANG_PATH)/libclang.dylib $(OUT_DIR) \ No newline at end of file
+ rm -rf $(OUT_DIR)/*
+ ln -sf $(LIBCLANG_PATH)/libclang$(DYLIB_EXT) $(OUT_DIR)
+