From 4d69682c9649d48e09ca97c3ec6f23213fdacc82 Mon Sep 17 00:00:00 2001 From: Anders Hoglund Date: Thu, 14 Jul 2016 10:33:05 +0100 Subject: [PATCH] Use ccache if it is installed on the system. --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e41d2d19e4..90a221d2a7 100644 --- a/Makefile +++ b/Makefile @@ -546,10 +546,17 @@ VPATH := $(VPATH):$(STDPERIPH_DIR)/src # Things that might need changing to use different tools # +# Find out if ccache is installed on the system +CCACHE := ccache +RESULT = $(shell which $(CCACHE)) +ifeq ($(RESULT),) +CCACHE := +endif + # Tool names -CC = arm-none-eabi-gcc -OBJCOPY = arm-none-eabi-objcopy -SIZE = arm-none-eabi-size +CC := $(CCACHE) arm-none-eabi-gcc +OBJCOPY := arm-none-eabi-objcopy +SIZE := arm-none-eabi-size # # Tool options.