gcc: preserve CXXFLAGS_FOR_TARGET
[buildroot-gz.git] / package / squashfs / squashfs.mk
blobcdeb9c8f72240a9cc27c74a386bdebcc23307e3e
1 ################################################################################
3 # squashfs
5 ################################################################################
7 SQUASHFS_VERSION = 4.3
8 SQUASHFS_SOURCE = squashfs$(SQUASHFS_VERSION).tar.gz
9 SQUASHFS_SITE = http://downloads.sourceforge.net/project/squashfs/squashfs/squashfs$(SQUASHFS_VERSION)
10 SQUASHFS_LICENSE = GPLv2+
11 SQUASHFS_LICENSE_FILES = COPYING
12 SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
14 ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
15 SQUASHFS_DEPENDENCIES += lz4
16 SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=1 COMP_DEFAULT=lz4
17 else
18 SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=0
19 endif
21 ifeq ($(BR2_PACKAGE_SQUASHFS_LZMA),y)
22 SQUASHFS_DEPENDENCIES += xz
23 SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=1 COMP_DEFAULT=lzma
24 else
25 SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=0
26 endif
28 ifeq ($(BR2_PACKAGE_SQUASHFS_XZ),y)
29 SQUASHFS_DEPENDENCIES += xz
30 SQUASHFS_MAKE_ARGS += XZ_SUPPORT=1 COMP_DEFAULT=xz
31 else
32 SQUASHFS_MAKE_ARGS += XZ_SUPPORT=0
33 endif
35 ifeq ($(BR2_PACKAGE_SQUASHFS_LZO),y)
36 SQUASHFS_DEPENDENCIES += lzo
37 SQUASHFS_MAKE_ARGS += LZO_SUPPORT=1 COMP_DEFAULT=lzo
38 else
39 SQUASHFS_MAKE_ARGS += LZO_SUPPORT=0
40 endif
42 ifeq ($(BR2_PACKAGE_SQUASHFS_GZIP),y)
43 SQUASHFS_DEPENDENCIES += zlib
44 SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=1 COMP_DEFAULT=gzip
45 else
46 SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
47 endif
49 HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz
51 HOST_SQUASHFS_MAKE_ARGS = \
52 XATTR_SUPPORT=1 \
53 XZ_SUPPORT=1 \
54 GZIP_SUPPORT=1 \
55 LZ4_SUPPORT=1 \
56 LZO_SUPPORT=1 \
57 LZMA_XZ_SUPPORT=1
59 define SQUASHFS_BUILD_CMDS
60 $(TARGET_MAKE_ENV) $(MAKE) \
61 CC="$(TARGET_CC)" \
62 EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
63 EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
64 $(SQUASHFS_MAKE_ARGS) \
65 -C $(@D)/squashfs-tools/
66 endef
68 define SQUASHFS_INSTALL_TARGET_CMDS
69 $(TARGET_MAKE_ENV) $(MAKE) $(SQUASHFS_MAKE_ARGS) \
70 -C $(@D)/squashfs-tools/ INSTALL_DIR=$(TARGET_DIR)/usr/bin install
71 endef
73 define HOST_SQUASHFS_BUILD_CMDS
74 $(HOST_MAKE_ENV) $(MAKE) \
75 CC="$(HOSTCC)" \
76 EXTRA_CFLAGS="$(HOST_CFLAGS)" \
77 EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \
78 $(HOST_SQUASHFS_MAKE_ARGS) \
79 -C $(@D)/squashfs-tools/
80 endef
82 define HOST_SQUASHFS_INSTALL_CMDS
83 $(HOST_MAKE_ENV) $(MAKE) $(HOST_SQUASHFS_MAKE_ARGS) \
84 -C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/usr/bin install
85 endef
87 $(eval $(generic-package))
88 $(eval $(host-generic-package))