Makefile 986 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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) \
  22. DESTDIR="$(STAGING_DIR_HOST)" \
  23. install
  24. endef
  25. define Build/Clean
  26. -$(MAKE) -C $(PKG_BUILD_DIR) uninstall
  27. -$(MAKE) -C $(PKG_BUILD_DIR) clean
  28. $(call Build/Clean/Default)
  29. endef
  30. else
  31. define Build/Prepare
  32. endef
  33. define Build/Configure
  34. endef
  35. define Build/Compile
  36. endef
  37. define Build/Clean
  38. endef
  39. endif
  40. $(eval $(call HostBuild))