Makefile 1.1 KB

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