aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2021-08-28 22:40:38 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2021-08-28 22:40:38 +0200
commit17d31bfad6e33c8622bfc5ddde5abf2d9a0de198 (patch)
tree8b86c91bfaae177e154bb46dcea9942a68e4c470 /Makefile
parent89ffd40d70e8505e21e07f5042e666db74cfa1a9 (diff)
Fix Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile49
1 files changed, 23 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index 1fc35a622..cdf4f0fc8 100644
--- a/Makefile
+++ b/Makefile
@@ -8,31 +8,31 @@ CC=clang
OS=$(shell uname)
ifeq ($(OS), Darwin)
- LLVM_CONFIG=llvm-config
- ifneq ($(shell llvm-config --version | grep '^11\.'),)
- LLVM_CONFIG=llvm-config
- else
- $(error "Requirement: llvm-config must be version 11")
- endif
-
- LDFLAGS:=$(LDFLAGS) -liconv
- CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
- LDFLAGS:=$(LDFLAGS) -lLLVM-C
+ LLVM_CONFIG=llvm-config
+ ifneq ($(shell llvm-config --version | grep '^11\.'),)
+ LLVM_CONFIG=llvm-config
+ else
+ $(error "Requirement: llvm-config must be version 11")
+ endif
+
+ LDFLAGS:=$(LDFLAGS) -liconv
+ CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
+ LDFLAGS:=$(LDFLAGS) -lLLVM-C
endif
ifeq ($(OS), Linux)
- 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
- endif
-
- CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
- LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
+ 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
+ endif
+
+ CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
+ LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
endif
all: debug demo
@@ -51,6 +51,3 @@ release_native:
nightly:
$(CC) src/main.cpp src/libtommath.cpp $(DISABLED_WARNINGS) $(CFLAGS) -DNIGHTLY -O3 $(LDFLAGS) -o odin
-
-
-