0849e8193e
Thanks to the pkgparentdir and pkgname functions, we can rewrite the GENTARGETS macro in a way that avoids the need for each package to repeat its name and the directory in which it is present. [Peter: pkgdir->pkgparentdir] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
77 lines
1.9 KiB
Makefile
77 lines
1.9 KiB
Makefile
SQUASHFS_VERSION=4.2
|
|
SQUASHFS_SOURCE=squashfs$(SQUASHFS_VERSION).tar.gz
|
|
SQUASHFS_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/squashfs
|
|
|
|
# no libattr in BR
|
|
SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=0
|
|
|
|
ifeq ($(BR2_PACKAGE_SQUASHFS_LZMA),y)
|
|
SQUASHFS_DEPENDENCIES += xz
|
|
SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=1 COMP_DEFAULT=lzma
|
|
else
|
|
SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=0
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_SQUASHFS_XZ),y)
|
|
SQUASHFS_DEPENDENCIES += xz
|
|
SQUASHFS_MAKE_ARGS += XZ_SUPPORT=1 COMP_DEFAULT=xz
|
|
else
|
|
SQUASHFS_MAKE_ARGS += XZ_SUPPORT=0
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_SQUASHFS_LZO),y)
|
|
SQUASHFS_DEPENDENCIES += lzo
|
|
SQUASHFS_MAKE_ARGS += LZO_SUPPORT=1 COMP_DEFAULT=lzo
|
|
else
|
|
SQUASHFS_MAKE_ARGS += LZO_SUPPORT=0
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_SQUASHFS_GZIP),y)
|
|
SQUASHFS_DEPENDENCIES += zlib
|
|
SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=1 COMP_DEFAULT=gzip
|
|
else
|
|
SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
|
|
endif
|
|
|
|
|
|
HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lzo host-xz
|
|
|
|
# no libattr/xz in BR
|
|
HOST_SQUASHFS_MAKE_ARGS = \
|
|
XATTR_SUPPORT=0 \
|
|
XZ_SUPPORT=1 \
|
|
GZIP_SUPPORT=1 \
|
|
LZO_SUPPORT=1 \
|
|
LZMA_XZ_SUPPORT=1
|
|
|
|
define SQUASHFS_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) \
|
|
CC="$(TARGET_CC)" \
|
|
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) $(SQUASHFS_MAKE_ARGS) \
|
|
-C $(@D)/squashfs-tools/ INSTALL_DIR=$(TARGET_DIR)/usr/bin install
|
|
endef
|
|
|
|
define HOST_SQUASHFS_BUILD_CMDS
|
|
$(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) $(HOST_SQUASHFS_MAKE_ARGS) \
|
|
-C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/usr/bin install
|
|
endef
|
|
|
|
$(eval $(call GENTARGETS))
|
|
$(eval $(call GENTARGETS,host))
|