-HOST_ARCH:=$(shell $(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/' \
- )
-
-GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu
+INSTALL_BIN:=install -m0755
+INSTALL_DIR:=install -d -m0755
+INSTALL_DATA:=install -m0644
+INSTALL_CONF:=install -m0600
+
+ifneq ($(CONFIG_CCACHE),)
+ # FIXME: move this variable to a better location
+ export CCACHE_DIR=$(STAGING_DIR)/ccache
+ TARGET_CC:= ccache $(TARGET_CC)
+endif
+
+EXTRA_CPPFLAGS := -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
+EXTRA_CFLAGS := $(EXTRA_CPPFLAGS)
+EXTRA_LDFLAGS := -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib