aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-10 13:25:18 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-10-10 13:25:18 +0000
commit58e3b95a2c1565981cbcd642ae5b3f8e8c0178b9 (patch)
treecc3956e3b9776dd89f2577b09289a8ec2c9655cc /include
parent3bef21bbc8621d894d1c2d3d3e5163c09bf72155 (diff)
downloadmaster-187ad058-58e3b95a2c1565981cbcd642ae5b3f8e8c0178b9.tar.gz
master-187ad058-58e3b95a2c1565981cbcd642ae5b3f8e8c0178b9.tar.bz2
master-187ad058-58e3b95a2c1565981cbcd642ae5b3f8e8c0178b9.zip
move certain host related variables to .host.mk generated by include/host-build.mk to speed up the build system
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@5012 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/host-build.mk21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/host-build.mk b/include/host-build.mk
index c19cb8fd1c..5670b6f17d 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -4,7 +4,26 @@
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-OS:=$(shell uname)
+
+include $(TOPDIR)/.host.mk
+
+$(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host-build.mk
+ echo "HOST_OS:=`uname`" > $@
+ echo "HOST_ARCH:=` \
+ $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
+ -e 's/sparc.*/sparc/' \
+ -e 's/arm.*/arm/' \
+ -e 's/m68k.*/m68k/' \
+ -e 's/ppc/powerpc/' \
+ -e 's/v850.*/v850/' \
+ -e 's/sh[234]/sh/' \
+ -e 's/mips-.*/mips/' \
+ -e 's/mipsel-.*/mipsel/' \
+ -e 's/cris.*/cris/' \
+ -e 's/i[3-9]86/i386/'`" >> $@
+ echo "GNU_HOST_NAME:=`$(HOSTCC) -dumpmachine`" >> $@
+
+
ifneq ($(strip $(PKG_CAT)),)
ifeq ($(PKG_CAT),unzip)
UNPACK=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE)