aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-04-27 13:14:54 +0100
committergingerBill <bill@gingerbill.org>2021-04-27 13:14:54 +0100
commitcd1658e56c63caa9c5257a4225660a704d4aa8f8 (patch)
tree796336342d771c2ae2eb0c2dd87e6c039d269b31 /Makefile
parente7e1866e5047a85648e758a2d94c8247c65a6608 (diff)
Update Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0425d17e0..8f2b7eaeb 100644
--- a/Makefile
+++ b/Makefile
@@ -8,13 +8,17 @@ CC=clang
OS=$(shell uname)
ifeq ($(OS), Darwin)
+ LLVM_CONFIG=llvm-config --version=11
+
LDFLAGS:=$(LDFLAGS) -liconv
- CFLAGS:=$(CFLAGS) $(shell llvm-config --cxxflags --ldflags)
+ CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG)--cxxflags --ldflags)
LDFLAGS:=$(LDFLAGS) -lLLVM-C
endif
ifeq ($(OS), Linux)
- CFLAGS:=$(CFLAGS) $(shell llvm-config-11 --cxxflags --ldflags)
- LDFLAGS:=$(LDFLAGS) $(shell llvm-config-11 --libs core native --system-libs)
+ LLVM_CONFIG=llvm-config-11
+
+ CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
+ LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
endif
all: debug demo