diff options
author | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2012-08-20 17:29:13 +0100 |
---|---|---|
committer | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2012-08-20 17:29:13 +0100 |
commit | d5be8343bd556d1a0c722cae9bb5b575f0f8c84e (patch) | |
tree | 8920f5a6481728307d3c4b6de8c729dd8d50b73f | |
parent | d860ac0dcaa3d0cf6f0c48c054938478ccc216f6 (diff) | |
download | buildsystem-d5be8343bd556d1a0c722cae9bb5b575f0f8c84e.tar.gz buildsystem-d5be8343bd556d1a0c722cae9bb5b575f0f8c84e.tar.bz2 |
add ccache support
-rw-r--r-- | makefiles/Makefile.tools | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools index cbef0b8..2f0ca05 100644 --- a/makefiles/Makefile.tools +++ b/makefiles/Makefile.tools @@ -315,7 +315,7 @@ ifeq ($(TARGET),atari) # Cross compiling for FreeMiNT ATARIARCH ?= 68020-60 - + GCCSDK_INSTALL_ENV ?= /opt/netsurf/m68k-atari-mint/env GCCSDK_INSTALL_CROSSBIN ?= /opt/netsurf/m68k-atari-mint/cross/bin CC__ := $(GCCSDK_INSTALL_CROSSBIN)/m68k-atari-mint-gcc @@ -397,6 +397,11 @@ XSLTPROC ?= xsltproc # Override defaulted tools ############################################################################### +# CCACHE +ifeq ($(origin CCACHE),undefined) + CCACHE=$(shell ccache -V >/dev/null 2>&1 && echo ccache || echo) +endif + # CC ifeq ($(findstring ccc-analyzer,$(CC)),ccc-analyzer) # We're being invoked by scan-build, so export @@ -413,7 +418,9 @@ else # Otherwise, leave it to be defaulted. ifeq ($(origin CC),default) ifdef CC__ - CC := $(CC__) + CC := $(CCACHE) $(CC__) + else + CC := $(CCACHE) $(CC) endif endif endif @@ -421,7 +428,9 @@ endif # CXX ifeq ($(origin CXX),default) ifdef CXX__ - CXX := $(CXX__) + CXX := $(CCACHE) $(CXX__) + else + CXX := $(CCACHE) $(CXX) endif endif |