tools/coreutils: bootstrap to local gnulib source
[openwrt/staging/jow.git] / tools / squashfs3-lzma / Makefile
1 #
2 # Copyright (C) 2006-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:=squashfs3-lzma
10 PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
11 PKG_VERSION:=3.0
12
13 PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=@SF/squashfs
15 PKG_HASH:=39dbda43cf118536deb746c7730b468702d514a19f4cfab73b710e32908ddf20
16
17 # Tar directory is squashfs3.0 that conflict with any pattern
18 # currently using for host tools. (PKG_NAME-PKG_VERSION)
19 # Also this got renamed to a more correct name
20 # from squashfs to squashfs3-lzma.
21 # Use tar transform to rename the root directory to this new
22 # name.
23 TAR_OPTIONS+=--transform=s/^squashfs/$(PKG_NAME)-/
24
25 include $(INCLUDE_DIR)/host-build.mk
26
27 define Host/Compile
28 $(MAKE) -C $(HOST_BUILD_DIR)/squashfs-tools \
29 CC="$(HOSTCC)" \
30 CFLAGS="$(HOST_CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I." \
31 CXX="$(CXX)" \
32 LZMAPATH=$(STAGING_DIR_HOST)/lib \
33 mksquashfs-lzma unsquashfs-lzma
34 endef
35
36 define Host/Install
37 $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR_HOST)/bin/mksquashfs3-lzma
38 $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs-lzma $(STAGING_DIR_HOST)/bin/unsquashfs3-lzma
39 endef
40
41 define Host/Clean
42 rm -f $(STAGING_DIR_HOST)/bin/mksquashfs3-lzma
43 rm -f $(STAGING_DIR_HOST)/bin/unsquashfs3-lzma
44 endef
45
46 $(eval $(call HostBuild))