Kbuild: use ccache if USE_CCACHE=1 is set

Change-Id: Ic9f1843bd697af497b5feec77bdb470b194115d2
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2015-07-27 11:04:24 -07:00 committed by Anas Nashif
commit 285c054830

View file

@ -316,11 +316,14 @@ MAKEFLAGS += --include-dir=$(srctree)
# We need some generic definitions (do not try to remake the file).
$(srctree)/scripts/Kbuild.include: ;
include $(srctree)/scripts/Kbuild.include
ifeq ($(USE_CCACHE),1)
CCACHE := ccache
endif
# Make variables (CC, etc...)
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
CC = $(CCACHE) $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm