From 722ce0628a281662a345346480acac78e3a0a6ac Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 4 Dec 2014 07:42:53 +1100 Subject: [PATCH] PX4: enable ccache on windows build --- mk/find_tools.mk | 4 +++- mk/px4_targets.mk | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mk/find_tools.mk b/mk/find_tools.mk index 84950d3334..cc9fce5278 100644 --- a/mk/find_tools.mk +++ b/mk/find_tools.mk @@ -22,7 +22,8 @@ ifeq ($(findstring CYGWIN, $(SYSTYPE)),CYGWIN) FIND_TOOL = $(firstword $(wildcard $(addsuffix /$(1).exe,$(TOOLPATH)))) endif ifeq ($(findstring MINGW, $(SYSTYPE)),MINGW) - TOOLPATH := $(ARDUINO)/hardware/tools/avr/bin + # expect that tools are on the path + TOOLPATH := $(subst :, ,$(PATH)) FIND_TOOL = $(firstword $(wildcard $(addsuffix /$(1).exe,$(TOOLPATH)))) endif @@ -84,6 +85,7 @@ ZYNQ_OBJCOPY := arm-xilinx-linux-gnueabi-objcopy # enable ccache if installed CCACHE := $(call FIND_TOOL,ccache) +export CCACHE CXX = $(CCACHE) $($(TOOLCHAIN)_CXX) CC = $(CCACHE) $($(TOOLCHAIN)_CC) diff --git a/mk/px4_targets.mk b/mk/px4_targets.mk index abfd931533..9f6649b348 100644 --- a/mk/px4_targets.mk +++ b/mk/px4_targets.mk @@ -50,8 +50,8 @@ WARNFLAGS = -Wno-psabi -Wno-packed -Wno-error=double-promotion -Wno-error=unused # avoid PX4 submodules export GIT_SUBMODULES_ARE_EVIL = 1 -PX4_MAKE = $(v) GIT_SUBMODULES_ARE_EVIL=1 make -C $(SKETCHBOOK) -f $(PX4_ROOT)/Makefile EXTRADEFINES="$(SKETCHFLAGS) $(WARNFLAGS) "'$(EXTRAFLAGS)' APM_MODULE_DIR=$(SKETCHBOOK) SKETCHBOOK=$(SKETCHBOOK) PX4_ROOT=$(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) MAXOPTIMIZATION="-Os" UAVCAN_DIR=$(UAVCAN_DIR) -PX4_MAKE_ARCHIVES = make -C $(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) archives MAXOPTIMIZATION="-Os" +PX4_MAKE = $(v) GIT_SUBMODULES_ARE_EVIL=1 make -C $(SKETCHBOOK) -f $(PX4_ROOT)/Makefile EXTRADEFINES="$(SKETCHFLAGS) $(WARNFLAGS) "'$(EXTRAFLAGS)' APM_MODULE_DIR=$(SKETCHBOOK) SKETCHBOOK=$(SKETCHBOOK) CCACHE=$(CCACHE) PX4_ROOT=$(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) MAXOPTIMIZATION="-Os" UAVCAN_DIR=$(UAVCAN_DIR) +PX4_MAKE_ARCHIVES = make -C $(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) CCACHE=$(CCACHE) archives MAXOPTIMIZATION="-Os" .PHONY: module_mk module_mk: