]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/commitdiff
Update Makefiles and README to use the default LLVM installation
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 11 Jul 2012 11:10:46 +0000 (13:10 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 11 Jul 2012 11:10:46 +0000 (13:10 +0200)
i.e. try to use llvm-config command. One can still override
the path to this command in Makefile.config.

Makefile
Readme.txt
src/Makefile

index 9f9a321ae637c27015be24214248e4d3a4ea66f4..6ad68ffe69cfe72f0ed88e548afaa1a49fb9780c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,23 +1,31 @@
 -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
index dd03b05f3dd007a30f56edda729154b32cfe85fd..3d69f2540874c9f9f0a6e5801f98b88a50a913dc 100644 (file)
@@ -1,9 +1,15 @@
 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.
index 42b4114a12763d50c03a460aa561ab07f4930705..0c8f7367c9bf31d8f0ee1e5d98f8dce8d8938c4f 100644 (file)
@@ -1,5 +1,7 @@
-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