INSTALL_CONF:=install -m0600
ifneq ($(CONFIG_CCACHE),)
- TARGET_CC:= ccache $(TARGET_CC)
- TARGET_CXX:= ccache $(TARGET_CXX)
+ TARGET_CC_NOCACHE:=$(TARGET_CC)
+ TARGET_CXX_NOCACHE:=$(TARGET_CXX)
+ export TARGET_CC_NOCACHE
+ export TARGET_CXX_NOCACHE
+ TARGET_CC:= ccache_cc
+ TARGET_CXX:= ccache_cxx
HOSTCC:= ccache $(HOSTCC)
endif
include $(INCLUDE_DIR)/host-build.mk
+define Host/Install/ccache
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
+ $(CP) ./files/* $(STAGING_DIR_HOST)/bin/
+endef
+
ifneq ($(strip $(shell which ccache >/dev/null && echo found)),found)
define Host/Compile
$(MAKE) CC="$(HOSTCC_NOCACHE)" -C $(HOST_BUILD_DIR)
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
$(call Host/Clean/Default)
endef
+ define Host/Install
+ $(call Host/Install/Default)
+ $(call Host/Install/ccache)
+ endef
else
define Host/Prepare
endef
define Host/Compile
endef
define Host/Install
+ $(call Host/Install/ccache)
endef
define Host/Clean
endef