aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2022-02-28 14:23:56 +0000
committerGitHub <noreply@github.com>2022-02-28 14:23:56 +0000
commitdd9843aa2102ba2df42e04d86680e03a27fa45f8 (patch)
treef48570df88dd42730bbd9f545eab89c352550aa8 /Makefile
parent3c72cb67d3f031a71152aadc480f5838d1833228 (diff)
parent04297bb68034196a212b040990bdeb4dc006c340 (diff)
Merge pull request #1557 from semarie/openbsd-support
initial OpenBSD support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 7f1b07f6d..ceff3c207 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
GIT_SHA=$(shell git rev-parse --short HEAD)
DISABLED_WARNINGS=-Wno-switch -Wno-macro-redefined -Wno-unused-value
-LDFLAGS=-pthread -ldl -lm -lstdc++
+LDFLAGS=-pthread -lm -lstdc++
CFLAGS=-std=c++14 -DGIT_SHA=\"$(GIT_SHA)\"
CFLAGS:=$(CFLAGS) -DODIN_VERSION_RAW=\"dev-$(shell date +"%Y-%m")\"
CC=clang
@@ -8,7 +8,7 @@ CC=clang
OS=$(shell uname)
ifeq ($(OS), Darwin)
-
+
ARCH=$(shell uname -m)
LLVM_CONFIG=llvm-config
@@ -35,7 +35,7 @@ ifeq ($(OS), Darwin)
endif
endif
- LDFLAGS:=$(LDFLAGS) -liconv
+ LDFLAGS:=$(LDFLAGS) -liconv -ldl
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
LDFLAGS:=$(LDFLAGS) -lLLVM-C
endif
@@ -51,6 +51,14 @@ ifeq ($(OS), Linux)
endif
endif
+ LDFLAGS:=$(LDFLAGS) -ldl
+ CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
+ LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
+endif
+ifeq ($(OS), OpenBSD)
+ LLVM_CONFIG=/usr/local/bin/llvm-config
+
+ LDFLAGS:=$(LDFLAGS) -liconv
CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags)
LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)
endif