From 3452278c66b5cf811fb6eb508827a01f45bc3173 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 21 Sep 2015 19:46:17 -0400 Subject: 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. --- sysinfo/host/native.mk | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'sysinfo/host/native.mk') 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 -- cgit v1.2.3