diff options
author | Suzuki K. Poulose <suzuki@in.ibm.com> | 2012-02-13 09:14:58 +0900 |
---|---|---|
committer | Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> | 2012-02-13 09:14:58 +0900 |
commit | 96f24dc77dc48e4c8f4c3527f4f5b4d27845393c (patch) | |
tree | 3b8b131c0357851ffde69d3005b066049f3c8020 /Makefile | |
parent | 7ccf93312266eb4b2e4f9ac701875eb926a861f3 (diff) |
[PATCH v1 1/3] Support for cross building.
Support cross building of makedumpfile. This would be useful for building
the makedumpfile for embedded PPC boards. Support for PPC32 would be added
in the later patches.
Use TARGET variable to set the arch to build for. Also honour the value of
CC if set.
Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -3,7 +3,11 @@ VERSION=1.4.2 DATE=25 January 2012 +# Honour the environment variable CC +ifeq ($(strip $CC),) CC = gcc +endif + CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"' @@ -11,7 +15,13 @@ CFLAGS_ARCH = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE # LDFLAGS = -L/usr/local/lib -I/usr/local/include -ARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \ +# Use TARGET as the target architecture if specified. +# Defaults to uname -m +ifeq ($(strip($TARGET)),) +TARGET := $(shell uname -m) +endif + +ARCH := $(shell echo ${TARGET} | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/ppc64/powerpc/ ) |