summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-09-21 19:46:17 -0400
committermidipix <writeonce@midipix.org>2016-11-10 23:35:20 -0500
commit3452278c66b5cf811fb6eb508827a01f45bc3173 (patch)
tree1e0eabcc7e4054415bf7abe5b6fabcd12fdc83f0
parentbf7b91d8ffab018be523701892aa2ea4b2fa6e9c (diff)
downloadperk-3452278c66b5cf811fb6eb508827a01f45bc3173.tar.bz2
perk-3452278c66b5cf811fb6eb508827a01f45bc3173.tar.xz
build template: native build: set ARCH according to OS and HOST_BITS.
The ARCH variable holds the name of a sub-folder where alternate, arch-specific source files may be provided. This project currently does not use such files (and none are anticipated), however other midipix projects which share the same build template do.
-rw-r--r--sysinfo/host/native.mk40
1 files changed, 40 insertions, 0 deletions
diff --git a/sysinfo/host/native.mk b/sysinfo/host/native.mk
index b697893..97fcb14 100644
--- a/sysinfo/host/native.mk
+++ b/sysinfo/host/native.mk
@@ -4,3 +4,43 @@ CC = $(BUILD_CC)
OS = $(BUILD_OS)
HOST_BITS = $(BUILD_OS_BITS)
HOST_UNDERSCORE = $(BUILD_OS_UNDERSCORE)
+
+ifeq ($(OS),linux)
+ ifeq ($(HOST_BITS),32)
+ ARCH = i386
+ else ifeq ($(HOST_BITS),64)
+ ARCH = x86_64
+ endif
+endif
+
+ifeq ($(OS),midipix)
+ ifeq ($(HOST_BITS),32)
+ ARCH = nt32
+ else ifeq ($(HOST_BITS),64)
+ ARCH = nt64
+ endif
+endif
+
+ifeq ($(OS),mingw)
+ ifeq ($(HOST_BITS),32)
+ ARCH = w32
+ else ifeq ($(HOST_BITS),64)
+ ARCH = w64
+ endif
+endif
+
+ifeq ($(OS),bsd)
+ ifeq ($(HOST_BITS),32)
+ ARCH = bsd32
+ else ifeq ($(HOST_BITS),64)
+ ARCH = bsd64
+ endif
+endif
+
+ifeq ($(OS),darwin)
+ ifeq ($(HOST_BITS),32)
+ ARCH = dw32
+ else ifeq ($(HOST_BITS),64)
+ ARCH = dw64
+ endif
+endif