aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Ravensloft <dan.ravensloft@gmail.com>2020-07-04 19:59:39 +0100
committerDan Ravensloft <dan.ravensloft@gmail.com>2020-07-04 19:59:39 +0100
commit7d5828a70635e3934300c15b5b6a89430a0f0355 (patch)
treea884cf5861b423211576d89e0ff0dfb245d9f2ba
parenta9b61080a409d3ad2c8ff4a9bbef9ba1c9c1d194 (diff)
downloadyosys-7d5828a70635e3934300c15b5b6a89430a0f0355.tar.gz
yosys-7d5828a70635e3934300c15b5b6a89430a0f0355.tar.bz2
yosys-7d5828a70635e3934300c15b5b6a89430a0f0355.zip
Add option to use ccache when building
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3d3e60359..b9c3d14eb 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@ ENABLE_GCOV := 0
ENABLE_GPROF := 0
ENABLE_DEBUG := 0
ENABLE_NDEBUG := 0
+ENABLE_CCACHE := 0
LINK_CURSES := 0
LINK_TERMCAP := 0
LINK_ABC := 0
@@ -528,6 +529,10 @@ ifeq ($(ENABLE_COVER),1)
CXXFLAGS += -DYOSYS_ENABLE_COVER
endif
+ifeq ($(ENABLE_CCACHE),1)
+CXX := ccache $(CXX)
+endif
+
define add_share_file
EXTRA_TARGETS += $(subst //,/,$(1)/$(notdir $(2)))
$(subst //,/,$(1)/$(notdir $(2))): $(2)