Makefile 930 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #
  2. # Copyright (C) 2006 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/target.mk
  9. PKG_NAME:=ccache
  10. PKG_VERSION:=2.4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://samba.org/ftp/ccache/
  13. PKG_MD5SUM:=73c1ed1e767c1752dd0f548ec1e66ce7
  14. PKG_CAT:=zcat
  15. PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  16. include $(INCLUDE_DIR)/host-build.mk
  17. ifneq ($(shell which ccache),)
  18. define Build/Configure
  19. $(call Build/Configure/Default)
  20. endef
  21. define Build/Compile
  22. $(MAKE) CC="$(HOSTCC)" -C $(PKG_BUILD_DIR)
  23. endef
  24. define Build/Install
  25. $(MAKE) -C $(PKG_BUILD_DIR) \
  26. DESTDIR="$(STAGING_DIR)" \
  27. install
  28. endef
  29. define Build/Clean
  30. $(MAKE) -C $(PKG_BUILD_DIR) uninstall
  31. -$(MAKE) -C $(PKG_BUILD_DIR) clean
  32. endef
  33. endif
  34. $(eval $(call HostBuild))