diff options
author | Edward Barnard <eabarnard@gmail.com> | 2014-09-22 12:41:54 +0100 |
---|---|---|
committer | Edward Barnard <eabarnard@gmail.com> | 2014-09-22 12:41:54 +0100 |
commit | aeac81f999d10cf74d6bd79daa75fe02890a2a74 (patch) | |
tree | 9042c76bce804db2d6962bb503604cd6a937ac5f | |
parent | 8af3d1734d66eb126073a1e51430d16268593d89 (diff) |
Default to libclang from Xcode on OS X
-rw-r--r-- | build/Makefile | 17 |
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) + |