aboutsummaryrefslogtreecommitdiff
path: root/depends/hosts
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-01-07 13:16:30 +0800
committerfanquake <fanquake@gmail.com>2022-02-10 12:33:10 +0000
commit471d15536f12889077578884fca33d1b0930fd66 (patch)
tree20b3fba56b89048479b7215c7377bf82e9ee6f05 /depends/hosts
parent75ae39eeec22e56c92f1241ff2ae87ad9a974625 (diff)
build: add support for OpenBSD to depends
Diffstat (limited to 'depends/hosts')
-rw-r--r--depends/hosts/openbsd.mk31
1 files changed, 31 insertions, 0 deletions
diff --git a/depends/hosts/openbsd.mk b/depends/hosts/openbsd.mk
new file mode 100644
index 0000000000..dc8393e04c
--- /dev/null
+++ b/depends/hosts/openbsd.mk
@@ -0,0 +1,31 @@
+openbsd_CFLAGS=-pipe
+openbsd_CFLAGS_CXXFLAGS=$(openbsd_CFLAGS)
+
+openbsd_CFLAGS_release_CFLAGS=-O2
+openbsd_CFLAGS_release_CXXFLAGS=$(openbsd_release_CFLAGS)
+
+openbsd_CFLAGS_debug_CFLAGS=-O1
+openbsd_CFLAGS_debug_CXXFLAGS=$(openbsd_debug_CFLAGS)
+
+ifeq (86,$(findstring 86,$(build_arch)))
+i686_openbsd_CC=clang -m32
+i686_openbsd_CXX=clang++ -m32
+i686_openbsd_AR=ar
+i686_openbsd_RANLIB=ranlib
+i686_openbsd_NM=nm
+i686_openbsd_STRIP=strip
+
+x86_64_openbsd_CC=clang -m64
+x86_64_openbsd_CXX=clang++ -m64
+x86_64_openbsd_AR=ar
+x86_64_openbsd_RANLIB=ranlib
+x86_64_openbsd_NM=nm
+x86_64_openbsd_STRIP=strip
+else
+i686_openbsd_CC=$(default_host_CC) -m32
+i686_openbsd_CXX=$(default_host_CXX) -m32
+x86_64_openbsd_CC=$(default_host_CC) -m64
+x86_64_openbsd_CXX=$(default_host_CXX) -m64
+endif
+
+openbsd_cmake_system=OpenBSD