X-Git-Url: http://rtime.felk.cvut.cz/gitweb/boost-statechart-viewer.git/blobdiff_plain/f821788a25d97fae41fe6e32ef704ee769ed84df..6024472d63f45c6700b10faac6a54d56938881fe:/Makefile diff --git a/Makefile b/Makefile index bc774c0..6ad68ff 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,31 @@ -#LLVM_SRC=llvm - -include config.local +ifneq ($(wildcard llvm/_build),) # Use our version of clang (even without installing) LLVM_BIN= $(CURDIR)/_install/bin -LLVM_CONFIG := $(shell $(LLVM_BIN)/llvm-config --cxxflags --ldflags --libs jit core) +LLVM_CONFIG := $(LLVM_BIN)/llvm-config + +export LLVM_CONFIG +compile_llvm_target = _install/lib/libclang.so +else +compile_llvm_target = skip_llvm +endif + +all: llvm src examples + +.PHONY: llvm src examples skip_llvm + +llvm: $(compile_llvm_target) + +_install/lib/libclang.so: + $(MAKE) -C llvm/_build install + +skip_llvm: + @echo "LLVM compilation skipped" + +src: llvm + $(MAKE) -C src -g++ : visualizer.cpp - g++ visualizer.cpp -o visualizer -g -lclangParse -lclangFrontend -lclangSerialization \ - -lclangDriver -lclangCodeGen -lclangSema -lclangChecker \ - -lclangAnalysis -lclangRewrite -lclangAST -lclangLex -lclangBasic \ - $(LLVM_CONFIG) +examples: src + $(MAKE) -C examples