Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # Copyright (C) 2006-2012 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:=3.1.7
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://samba.org/ftp/ccache/
  13. PKG_MD5SUM:=80a698c22d0b06b19c88ac58e8d8b632
  14. include $(INCLUDE_DIR)/host-build.mk
  15. define Host/Install/ccache
  16. $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
  17. $(CP) ./files/* $(STAGING_DIR_HOST)/bin/
  18. endef
  19. ifneq ($(strip $(shell which ccache >/dev/null && echo found)),found)
  20. define Host/Compile
  21. $(MAKE) CC="$(HOSTCC_NOCACHE)" -C $(HOST_BUILD_DIR)
  22. endef
  23. define Host/Clean
  24. -$(MAKE) -C $(HOST_BUILD_DIR) uninstall
  25. $(call Host/Clean/Default)
  26. endef
  27. define Host/Install
  28. $(call Host/Install/Default)
  29. $(call Host/Install/ccache)
  30. endef
  31. else
  32. define Host/Prepare
  33. endef
  34. define Host/Configure
  35. endef
  36. define Host/Compile
  37. endef
  38. define Host/Install
  39. $(call Host/Install/ccache)
  40. endef
  41. define Host/Clean
  42. endef
  43. define Download
  44. endef
  45. endif
  46. $(eval $(call HostBuild))