ref: 59e6ab91cf09876fa5a61ec2138cd85bcf83cb83
parent: 8d95d0841dfae8236ed4bb319156d7580ec3623a
author: Martin Storsjö <[email protected]>
date: Tue Feb 25 18:48:35 EST 2014
Use an intermediate platform header for including architecture specific rules This avoids coupling the architecture directly to the platform, allowing building on e.g. linux on architectures other than x86, without having to explicitly specify USE_ASM=No while building on those. Later this will also facilitate enabling assembly optimizations where applicable, e.g. arm assembly on linux.
--- /dev/null
+++ b/build/platform-arch.mk
@@ -1,0 +1,3 @@
+ifneq ($(filter %86 x86_64, $(ARCH)),)
+include build/platform-x86-common.mk
+endif
--- a/build/platform-darwin.mk
+++ b/build/platform-darwin.mk
@@ -1,4 +1,4 @@
-include build/platform-x86-common.mk
+include build/platform-arch.mk
ASM = nasm
SHAREDLIBSUFFIX = dylib
SHARED = -dynamiclib
--- a/build/platform-freebsd.mk
+++ b/build/platform-freebsd.mk
@@ -1,4 +1,4 @@
-include build/platform-x86-common.mk
+include build/platform-arch.mk
ASM = nasm
SHAREDLIBSUFFIX = so
CFLAGS += -fPIC -DMT_ENABLED
--- a/build/platform-linux.mk
+++ b/build/platform-linux.mk
@@ -1,4 +1,4 @@
-include build/platform-x86-common.mk
+include build/platform-arch.mk
ASM = nasm
SHAREDLIBSUFFIX = so
CFLAGS += -Werror -fPIC -DLINUX -DMT_ENABLED -MMD -MP