summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile3
-rw-r--r--tools/ccache/Makefile25
2 files changed, 28 insertions, 0 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 2d29372dc..a8156cb79 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -29,6 +29,9 @@ endif
ifeq ($(ADK_HOST_NEED_LZMA),y)
TARGETS+=lzma
endif
+ifeq ($(ADK_HOST_NEED_CCACHE),y)
+TARGETS+=ccache
+endif
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile
new file mode 100644
index 000000000..fde838067
--- /dev/null
+++ b/tools/ccache/Makefile
@@ -0,0 +1,25 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= ccache
+PKG_VERSION:= 3.1.9
+PKG_RELEASE:= 1
+PKG_MD5SUM:= a5e9954b1dae036762f7b13673a2cf76
+PKG_SITES:= http://samba.org/ftp/ccache/
+
+include ../rules.mk
+
+install: ${STAGING_HOST_DIR}/usr/bin/ccache
+
+$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
+ (cd ${WRKBUILD}; ./configure --prefix=$(STAGING_HOST_DIR)/usr)
+ ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}'
+ touch $@
+
+${STAGING_HOST_DIR}/usr/bin/ccache: $(WRKBUILD)/.compiled
+ $(INSTALL_BIN) $(WRKBUILD)/ccache \
+ ${STAGING_HOST_DIR}/usr/bin
+
+include $(TOPDIR)/mk/tools.mk