Makefile 989 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. PKG_NAME:=squashfs
  9. PKG_VERSION:=3.0
  10. PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=@SF/squashfs
  12. PKG_MD5SUM:=9fd05d0bfbb712f5fb95edafea5bc733
  13. PKG_CAT:=zcat
  14. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(PKG_VERSION)
  15. include $(INCLUDE_DIR)/host-build.mk
  16. define Host/Compile
  17. $(MAKE) -C $(HOST_BUILD_DIR)/squashfs-tools \
  18. CC="$(HOSTCC)" \
  19. CXX="$(CXX)" \
  20. LZMAPATH=$(STAGING_DIR_HOST)/lib \
  21. mksquashfs-lzma unsquashfs-lzma
  22. endef
  23. define Host/Install
  24. $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR_HOST)/bin/
  25. $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs-lzma $(STAGING_DIR_HOST)/bin/
  26. endef
  27. define Host/Clean
  28. rm -f $(STAGING_DIR_HOST)/bin/mksquashfs-lzma
  29. rm -f $(STAGING_DIR_HOST)/bin/unsquashfs-lzma
  30. endef
  31. $(eval $(call HostBuild))