2018-07-13 01:31:50 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2009-2012 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=squashfs4
|
2018-12-13 10:48:25 +00:00
|
|
|
PKG_VERSION:=4.3
|
2018-07-13 01:31:50 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=@SF/squashfs
|
2018-12-13 10:48:25 +00:00
|
|
|
PKG_MD5SUM:=d92ab59aabf5173f2a59089531e30dbf
|
2018-07-13 01:31:50 +00:00
|
|
|
PKG_CAT:=zcat
|
|
|
|
|
|
|
|
HOST_BUILD_DIR:=$(COMPILE_DIR_HOST)/squashfs$(PKG_VERSION)
|
|
|
|
|
|
|
|
include $(BUILD_DIR)/host-build.mk
|
|
|
|
|
2018-12-13 10:48:25 +00:00
|
|
|
ifneq ($(CONFIG_USE_SELINUX),)
|
|
|
|
SELINUX_ENABLE=1
|
|
|
|
else
|
|
|
|
SELINUX_ENABLE=0
|
|
|
|
endif
|
|
|
|
|
2018-07-13 01:31:50 +00:00
|
|
|
define Host/Compile
|
|
|
|
$(MAKE) -C $(HOST_BUILD_DIR)/squashfs-tools \
|
|
|
|
CC="$(HOSTCC)" \
|
|
|
|
XZ_SUPPORT=1 \
|
|
|
|
LZMA_XZ_SUPPORT=1 \
|
2018-12-13 10:48:25 +00:00
|
|
|
XATTR_SUPPORT=1 \
|
|
|
|
SELINUX_SUPPORT=$(SELINUX_ENABLE) \
|
2018-07-13 01:31:50 +00:00
|
|
|
LZMA_LIB="$(STAGING_DIR_HOST)/lib/liblzma.a" \
|
2018-12-13 10:48:25 +00:00
|
|
|
EXTRA_CFLAGS="-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include" \
|
|
|
|
LDFLAGS="$(HOST_LDFLAGS)" \
|
2018-07-13 01:31:50 +00:00
|
|
|
mksquashfs unsquashfs
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Install
|
|
|
|
$(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs $(STAGING_DIR_HOST)/bin/mksquashfs4
|
|
|
|
$(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs $(STAGING_DIR_HOST)/bin/unsquashfs4
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Clean
|
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/mksquashfs4
|
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/unsquashfs4
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|