Makefile 948 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. include $(INCLUDE_DIR)/host-build.mk
  16. ifneq ($(strip $(shell which ccache >/dev/null && echo found)),found)
  17. define Build/Compile
  18. $(MAKE) CC="$(HOSTCC)" -C $(PKG_BUILD_DIR)
  19. endef
  20. define Build/Install
  21. $(MAKE) -C $(PKG_BUILD_DIR) install
  22. endef
  23. define Build/Clean
  24. -$(MAKE) -C $(PKG_BUILD_DIR) uninstall
  25. -$(MAKE) -C $(PKG_BUILD_DIR) clean
  26. $(call Build/Clean/Default)
  27. endef
  28. else
  29. define Build/Prepare
  30. endef
  31. define Build/Configure
  32. endef
  33. define Build/Compile
  34. endef
  35. define Build/Clean
  36. endef
  37. endif
  38. $(eval $(call HostBuild))