-include config.local
+ifneq ($(wildcard llvm/_build),)
# Use our version of clang (even without installing)
LLVM_BIN= $(CURDIR)/_install/bin
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
+.PHONY: llvm src examples skip_llvm
-llvm: _install/lib/libclang.so
+llvm: $(compile_llvm_target)
_install/lib/libclang.so:
$(MAKE) -C llvm/_build install
+skip_llvm:
+ @echo "LLVM compilation skipped"
+
src: llvm
$(MAKE) -C src
examples: src
- $(MAKE) -C examples
\ No newline at end of file
+ $(MAKE) -C examples
Thank you for downloading Boost Statechart viewer.
-Source files are located in the directory src. For compilation create file Makefile.config in this directory and add there one line:
+Source files are located in the directory src. To compile them, simpy
+type
+
+ make
+
+If you want to use different clang/llvm version, create a file called
+Makefile.config in this directory and add there one line:
LLVM_CONFIG := where you have your llvm bin files/llvm-config
-This is necessary for compilation of the program. Compiler needs to be able to find LLVM and Clang header files. And now you can go to directory src and compile the whole application.
+This program was tested with LLVM/Clang 2.8.
Enjoy using it.
-include ../Makefile.config
-
+-include ../Makefile.config
+
+LLVM_CONFIG ?= llvm-config
+
LLVM_FLAGS := $(shell $(LLVM_CONFIG) --cxxflags --ldflags --libs jit core)
visualizer: visualizer.cpp stringoper.h iooper.h