]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/blobdiff - Makefile
Update Makefiles and README to use the default LLVM installation
[boost-statechart-viewer.git] / 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