]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/commitdiff
Fix link error with clang-3.2
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 14 Oct 2013 12:09:23 +0000 (14:09 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 14 Oct 2013 12:09:23 +0000 (14:09 +0200)
src/Makefile

index 77e0480cdf6c4893af164cb647c1efab284afdeb..71e2dceb90a7f586b3827f8bda807c0235e1281f 100644 (file)
@@ -4,12 +4,17 @@ LLVM_CONFIG ?= llvm-config
 
 LLVM_FLAGS := $(shell $(LLVM_CONFIG) --cxxflags --ldflags --libs jit core)
 LLVM_FLAGS := $(filter-out -DNDEBUG,$(LLVM_FLAGS))
+LLVM_VERSION := $(shell $(LLVM_CONFIG) --version)
 
 LIBDIR ?= $(CURDIR)
 
 CLANG_LIBS := -lclangParse -lclangFrontend -lclangSerialization        \
  -lclangDriver -lclangCodeGen -lclangSema -lclangAnalysis      \
- -lclangRewrite -lclangAST -lclangLex -lclangBasic -lclangEdit
+ -lclangAST -lclangLex -lclangBasic -lclangEdit
+
+ifneq (,$(filter 3.0,$(LLVM_VERSION))$(filter 3.1,$(LLVM_VERSION)))
+CLANG_LIBS += -lclangRewrite
+endif
 
 all: visualizer.so boost-statechart-viewer