summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2014-12-15 11:53:20 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-12-15 12:33:21 +1100
commit8b794c5312203452e46f4b4f397ae062f408bf6e (patch)
tree44f15d1ee892bc095223fde7c74539d140b94faa /Makefile
parentfef06cd9d86c09dc7053a44eea71ab77f3b9da5d (diff)
downloadblackbird-skiboot-8b794c5312203452e46f4b4f397ae062f408bf6e.tar.gz
blackbird-skiboot-8b794c5312203452e46f4b4f397ae062f408bf6e.zip
Makefile: Support CROSS_COMPILE as well as CROSS
A lot of projects use CROSS_COMPILE for specifying the cross compile prefix, so support that as well as CROSS. For example this allows a user to set CROSS_COMPILE once in their environment and build both Linux & Skiboot with the same setting. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> [stewart@linux.vnet.ibm.com: only set if env variable is set] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 96c387f0..758bbb91 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,9 @@
# Example: CROSS= powerpc64-unknown-linux-gnu-
#
ARCH = $(shell uname -m)
+ifdef CROSS_COMPILE
+ CROSS ?= $(CROSS_COMPILE)
+endif
ifeq ("$(ARCH)", "ppc64")
CROSS ?=
else
OpenPOWER on IntegriCloud