Makefile 1.0 KB

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