diff --git a/simulator/Makefile b/simulator/Makefile index 77842a6ae8..01ac3ea70c 100644 --- a/simulator/Makefile +++ b/simulator/Makefile @@ -27,6 +27,13 @@ ifeq ($(USE_OPT),) endif endif +ifeq ($(CCACHE_DIR),) + $(info No CCACHE_DIR) +else + $(info CCACHE_DIR is ${CCACHE_DIR}) + CCPREFIX=ccache +endif + # C specific options here (added to USE_OPT). ifeq ($(USE_COPT),) USE_COPT = -std=gnu99 @@ -218,8 +225,8 @@ else TRGT = endif -CC = $(TRGT)gcc -CPPC = $(TRGT)g++ +CC = $(CCPREFIX) $(TRGT)gcc +CPPC = $(CCPREFIX) $(TRGT)g++ # Enable loading with g++ only if you need C++ runtime support. # NOTE: You can use C++ even without C++ support if you are careful. C++ # runtime support makes code size explode.