summaryrefslogtreecommitdiffstats
path: root/package/squashfs/squashfs.mk
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-09-20 16:19:26 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-09-20 16:21:20 +0200
commit785fef108ebd940aeabe7e5c2d6d5f54f98e6146 (patch)
treeba65c40a5e609df2fa073e28e5139f1125ca619a /package/squashfs/squashfs.mk
parent3df6b56f53a0dd92752a23e63a0ee5fcacc8ffd0 (diff)
downloadbuildroot-novena-785fef108ebd940aeabe7e5c2d6d5f54f98e6146.tar.gz
buildroot-novena-785fef108ebd940aeabe7e5c2d6d5f54f98e6146.zip
squashfs: bump 4.x, add lzo support
We'll need libattr/xz packages in BR to enable support for those. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/squashfs/squashfs.mk')
-rw-r--r--package/squashfs/squashfs.mk50
1 files changed, 41 insertions, 9 deletions
diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
index 1dccb0881..0332d60cd 100644
--- a/package/squashfs/squashfs.mk
+++ b/package/squashfs/squashfs.mk
@@ -1,30 +1,62 @@
-SQUASHFS_VERSION=4.0
+SQUASHFS_VERSION=4.1
SQUASHFS_SOURCE=squashfs$(SQUASHFS_VERSION).tar.gz
SQUASHFS_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/squashfs
-SQUASHFS_DEPENDENCIES = zlib
-HOST_SQUASHFS_DEPENDENCIES = host-zlib
+# no libattr/xz in BR
+SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=0 XZ_SUPPORT=0
+
+# we need atleast one compresser, so use gzip if lzo isn't enabled
+ifeq ($(BR2_PACKAGE_SQUASHFS_GZIP)$(if $(BR2_PACKAGE_SQUASHFS_LZO),,y),y)
+SQUASHFS_DEPENDENCIES += zlib
+SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=1
+else
+SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0 COMP_DEFAULT=lzo
+endif
+
+ifeq ($(BR2_PACKAGE_SQUASHFS_LZO),y)
+SQUASHFS_DEPENDENCIES += lzo
+SQUASHFS_MAKE_ARGS += LZO_SUPPORT=1
+else
+SQUASHFS_MAKE_ARGS += LZO_SUPPORT=0
+endif
+
+
+HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lzo
+
+# no libattr/xz in BR
+HOST_SQUASHFS_MAKE_ARGS = \
+ XATTR_SUPPORT=0 \
+ XZ_SUPPORT=0 \
+ GZIP_SUPPORT=1 \
+ LZO_SUPPORT=1
define SQUASHFS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) \
CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
+ EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
+ EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
+ $(SQUASHFS_MAKE_ARGS) \
-C $(@D)/squashfs-tools/
endef
define SQUASHFS_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/squashfs-tools/ INSTALL_DIR=$(TARGET_DIR)/usr/bin install
+ $(TARGET_MAKE_ENV) $(MAKE) $(SQUASHFS_MAKE_ARGS) \
+ -C $(@D)/squashfs-tools/ INSTALL_DIR=$(TARGET_DIR)/usr/bin install
endef
define HOST_SQUASHFS_BUILD_CMDS
- $(HOST_MAKE_ENV) $(MAKE) CFLAGS="$(HOST_CFLAGS)" LDFLAGS="$(HOST_LDFLAGS)" -C $(@D)/squashfs-tools/
+ $(HOST_MAKE_ENV) $(MAKE) \
+ CC="$(HOSTCC)" \
+ EXTRA_CFLAGS="$(HOST_CFLAGS)" \
+ EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \
+ $(HOST_SQUASHFS_MAKE_ARGS) \
+ -C $(@D)/squashfs-tools/
endef
define HOST_SQUASHFS_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/usr/bin install
+ $(HOST_MAKE_ENV) $(MAKE) $(HOST_SQUASHFS_MAKE_ARGS) \
+ -C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/usr/bin install
endef
$(eval $(call GENTARGETS,package,squashfs))
$(eval $(call GENTARGETS,package,squashfs,host))
-