From 4e885757e8934ceb715c6092e9efd3a6ff395086 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 8 Oct 2008 14:05:03 +0000 Subject: - add/use variables to make build-tools configurable --- Rules.mak | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index 44be75c39..030959593 100644 --- a/Rules.mak +++ b/Rules.mak @@ -41,6 +41,8 @@ INSTALL = install LN = ln RM = rm -f TAR = tar +SED = sed +AWK = awk STRIP_FLAGS ?= -x -R .note -R .comment @@ -49,8 +51,10 @@ UNIFDEF := $(top_builddir)extra/scripts/unifdef -UUCLIBC_INTERNAL # Select the compiler needed to build binaries for your development system HOSTCC = gcc BUILD_CFLAGS = -O2 -Wall -export ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun.*/sparc/ -e s/sparc.*/sparc/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ -e s/sh.*/sh/ \ +export ARCH := $(shell uname -m | $(SED) -e s/i.86/i386/ \ + -e s/sun.*/sparc/ -e s/sparc.*/sparc/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/sh.*/sh/ \ -e s/s390x/s390/ -e s/parisc.*/hppa/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ -e s/xtensa.*/xtensa/ ) @@ -67,9 +71,9 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) endif # Make certain these contain a final "/", but no "//"s. -TARGET_ARCH:=$(shell grep -s '^TARGET_ARCH' $(top_builddir)/.config | sed -e 's/^TARGET_ARCH=//' -e 's/"//g') +TARGET_ARCH:=$(shell grep -s '^TARGET_ARCH' $(top_builddir)/.config | $(SED) -e 's/^TARGET_ARCH=//' -e 's/"//g') TARGET_ARCH:=$(strip $(subst ",, $(strip $(TARGET_ARCH)))) -TARGET_SUBARCH:=$(shell grep -s '^TARGET_SUBARCH' $(top_builddir)/.config | sed -e 's/^TARGET_SUBARCH=//' -e 's/"//g') +TARGET_SUBARCH:=$(shell grep -s '^TARGET_SUBARCH' $(top_builddir)/.config | $(SED) -e 's/^TARGET_SUBARCH=//' -e 's/"//g') TARGET_SUBARCH:=$(strip $(subst ",, $(strip $(TARGET_SUBARCH)))) RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(RUNTIME_PREFIX)))))) DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(DEVEL_PREFIX)))))) -- cgit v1.2.3