[tools] convert remaining tools to $(HOST_STATIC_LINKING) (#12012)
[openwrt/svn-archive/archive.git] / tools / squashfs4 / Makefile
1 #
2 # Copyright (C) 2009-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
9 PKG_NAME:=squashfs4
10 PKG_VERSION:=4.2
11
12 PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz
13 PKG_SOURCE_URL:=@SF/squashfs
14 PKG_MD5SUM:=1b7a781fb4cf8938842279bd3e8ee852
15 PKG_CAT:=zcat
16
17 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/squashfs$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/host-build.mk
20
21 define Host/Compile
22 $(MAKE) -C $(HOST_BUILD_DIR)/squashfs-tools \
23 CC="$(HOSTCC)" \
24 XZ_SUPPORT=1 \
25 LZMA_XZ_SUPPORT=1 \
26 XATTR_SUPPORT= \
27 LZMA_LIB="$(STAGING_DIR_HOST)/lib/liblzma.a" \
28 EXTRA_CFLAGS="-I$(STAGING_DIR_HOST)/include" \
29 EXTRA_LDFLAGS="$(HOST_STATIC_LINKING)" \
30 mksquashfs unsquashfs
31 endef
32
33 define Host/Install
34 $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs $(STAGING_DIR_HOST)/bin/mksquashfs4
35 $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs $(STAGING_DIR_HOST)/bin/unsquashfs4
36 endef
37
38 define Host/Clean
39 rm -f $(STAGING_DIR_HOST)/bin/mksquashfs4
40 rm -f $(STAGING_DIR_HOST)/bin/unsquashfs4
41 endef
42
43 $(eval $(call HostBuild))