]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/blobdiff - src/Makefile
Do not require C++11 capable compiler
[boost-statechart-viewer.git] / src / Makefile
index 2a67779859dee08718507547378263eb5ccb4bfd..ccc7eb212c52e1ef9b0866282a7a9d7433bdc1cc 100644 (file)
@@ -1,18 +1,13 @@
--include ../config.local
+-include ../Makefile.config
 
-# Use our version of clang (even without installing)
-LLVM_BIN= $(CURDIR)/../_install/bin
+LLVM_CONFIG ?= llvm-config
 
-LLVM_CONFIG := $(shell $(LLVM_BIN)/llvm-config --cxxflags --ldflags --libs jit core)
+LLVM_FLAGS := $(shell $(LLVM_CONFIG) --cxxflags --ldflags --libs jit core)
+LLVM_FLAGS := $(filter-out -DNDEBUG,$(LLVM_FLAGS))
 
-visualizer: visualizer.cpp commandlineopt.h stringoper.h
-       g++ $< -o $@ -g -lclangParse -lclangFrontend -lclangSerialization \
-       -lclangDriver -lclangCodeGen -lclangSema -lclangChecker \
-       -lclangAnalysis -lclangRewrite -lclangAST -lclangLex -lclangBasic \
-       $(LLVM_CONFIG)
+CLANG_LIBS := -lclangParse -lclangFrontend -lclangSerialization        \
+ -lclangDriver -lclangCodeGen -lclangSema -lclangAnalysis      \
+ -lclangRewrite -lclangAST -lclangLex -lclangBasic -lclangEdit
 
-.PHONY: test
-test: test.dot
-
-%.dot: %.cpp visualizer
-       ./visualizer $< -o $@
+visualizer.so: visualizer.cpp
+       $(CXX) -g -fno-rtti -shared -Wall $(CLANG_LIBS) $(LLVM_FLAGS) -o $@ $<