aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-04-28 16:23:42 +0100
committergingerBill <bill@gingerbill.org>2021-04-28 16:23:42 +0100
commitbee637aef178e71f8bd67433358ab3b382a4305f (patch)
tree7d0a0993f9063091e445dea5e86cd34baf32dd75 /Makefile
parentd5844dfd2aaa47de24e695ea3ecfd3ea05c9043a (diff)
Update Makefile for Linux
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 1eefb02ea..c8199b01e 100644
--- a/Makefile
+++ b/Makefile
@@ -15,14 +15,15 @@ ifeq ($(OS), Darwin)
LDFLAGS:=$(LDFLAGS) -lLLVM-C
endif
ifeq ($(OS), Linux)
- ifneq ($(shell command -v llvm-config-11),)
+ LLVM_CONFIG=llvm-config-11
+ ifneq ($(shell which llvm-config-11 2>/dev/null),)
LLVM_CONFIG=llvm-config-11
else
- ifneq ($(shell llvm-config --version | grep 11),)
- LLVM_CONFIG=llvm-config
- else
- $(error "Requirement: llvm-config must be version 11")
- endif
+ ifneq ($(shell llvm-config --version | grep '^11\.'),)
+ LLVM_CONFIG=llvm-config
+ else
+ $(error "Requirement: llvm-config must be version 11")
+ endif
endif
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)