summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 24bfd8f..11e59a6 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -72,12 +72,13 @@ ToiletKit_LDFLAGS = -lgmp -lffi -ldl
USE_LLVM := YES
ifeq ($(USE_LLVM),YES)
-ADDITIONAL_OBJCCFLAGS += $(ADDITIONAL_OBJCFLAGS)
+LLVM_CONFIG = llvm-config
+ADDITIONAL_OBJCCFLAGS = $(ADDITIONAL_OBJCFLAGS)
ToiletKit_OBJC_FILES += MLKLexicalContext-MLKLLVMCompilation.m
-ToiletKit_OBJCC_FILES += MLKLLVMCompiler.mm
-ToiletKit_OBJCFLAGS += -DUSE_LLVM -DLLVM_MAJOR_VERSION=`llvm-config --version | cut -f 1 -d.` -DLLVM_MINOR_VERSION=`llvm-config --version | cut -f 2 -d. | sed s/svn//`
-ToiletKit_OBJCCFLAGS += `llvm-config --cxxflags` $(ToiletKit_OBJCFLAGS)
-ToiletKit_LDFLAGS += `llvm-config --ldflags` `llvm-config --libs backend engine linker codegen transformutils scalaropts analysis ipo`
+ToiletKit_OBJCC_FILES = MLKLLVMCompiler.mm
+ToiletKit_OBJCFLAGS = -DUSE_LLVM -DLLVM_MAJOR_VERSION=`llvm-config --version | cut -f 1 -d.` -DLLVM_MINOR_VERSION=`llvm-config --version | cut -f 2 -d. | sed s/svn//`
+ToiletKit_OBJCCFLAGS = -DUSE_LLVM `$(LLVM_CONFIG) --cxxflags` $(ToiletKit_OBJCFLAGS)
+ToiletKit_LDFLAGS += `$(LLVM_CONFIG) --ldflags` `$(LLVM_CONFIG) --libs backend engine linker codegen transformutils scalaropts analysis ipo`
endif
#TOOL_NAME = etoilet