aboutsummaryrefslogtreecommitdiff
path: root/make.rules
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2014-03-27 15:55:15 +0530
committerNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2014-03-27 15:55:15 +0530
commit8415208ae4d279bcab37fe4b475167c465303cf5 (patch)
tree9a277f9ff41be534ec6c32f22a3e3471d52fef9b /make.rules
parent5635b6cc92ecf120a8ac798541a8732e91b6b697 (diff)
downloadSLOF-8415208ae4d279bcab37fe4b475167c465303cf5.zip
SLOF-8415208ae4d279bcab37fe4b475167c465303cf5.tar.gz
SLOF-8415208ae4d279bcab37fe4b475167c465303cf5.tar.bz2
build: auto-detect ppc64 architecture
Remove the silliness of running make on powerpc like this; $ CROSS= make The default value of CROSS prevented this, detect the architecture in the makefile and sent the CROSS accordingly. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Diffstat (limited to 'make.rules')
-rw-r--r--make.rules7
1 files changed, 7 insertions, 0 deletions
diff --git a/make.rules b/make.rules
index dae1572..aebc4e3 100644
--- a/make.rules
+++ b/make.rules
@@ -16,7 +16,14 @@
# CROSS is the prefix of your cross-compiler.
# You can override this variable in your environment (export CROSS=...).
+ARCH := $(shell uname -p)
+
+# Auto-detect ppc64
+ifeq ($(ARCH), ppc64)
+CROSS = ""
+else
CROSS ?= powerpc64-linux-
+endif
CELLSIZE ?= 64