move the common variables from host-build.mk to host.mk
[15.05/openwrt.git] / include / host.mk
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/.host.mk
9
10 $(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host.mk
11         echo "HOST_OS:=`uname`" > $@
12         echo "HOST_ARCH:=` \
13                 $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
14                         -e 's/sparc.*/sparc/' \
15                         -e 's/arm.*/arm/' \
16                         -e 's/m68k.*/m68k/' \
17                         -e 's/ppc/powerpc/' \
18                         -e 's/v850.*/v850/' \
19                         -e 's/sh[234]/sh/' \
20                         -e 's/mips-.*/mips/' \
21                         -e 's/mipsel-.*/mipsel/' \
22                         -e 's/cris.*/cris/' \
23                         -e 's/i[3-9]86/i386/'`" >> $@
24         echo "GNU_HOST_NAME:=`$(HOSTCC) -dumpmachine`" >> $@