Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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_HASH:=39dbda43cf118536deb746c7730b468702d514a19f4cfab73b710e32908ddf20
  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. CFLAGS="$(HOST_CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I." \
  20. CXX="$(CXX)" \
  21. LZMAPATH=$(STAGING_DIR_HOST)/lib \
  22. mksquashfs-lzma unsquashfs-lzma
  23. endef
  24. define Host/Install
  25. $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR_HOST)/bin/
  26. $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs-lzma $(STAGING_DIR_HOST)/bin/
  27. endef
  28. define Host/Clean
  29. rm -f $(STAGING_DIR_HOST)/bin/mksquashfs-lzma
  30. rm -f $(STAGING_DIR_HOST)/bin/unsquashfs-lzma
  31. endef
  32. $(eval $(call HostBuild))