tools/scons: update to 3.0.1
[openwrt/openwrt.git] / tools / squashfs / 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:=squashfs
10 PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
11 PKG_VERSION:=3.0
12
13 PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=@SF/squashfs
15 PKG_HASH:=39dbda43cf118536deb746c7730b468702d514a19f4cfab73b710e32908ddf20
16 PKG_CAT:=zcat
17
18 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/host-build.mk
21
22 define Host/Compile
23 $(MAKE) -C $(HOST_BUILD_DIR)/squashfs-tools \
24 CC="$(HOSTCC)" \
25 CFLAGS="$(HOST_CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I." \
26 CXX="$(CXX)" \
27 LZMAPATH=$(STAGING_DIR_HOST)/lib \
28 mksquashfs-lzma unsquashfs-lzma
29 endef
30
31 define Host/Install
32 $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR_HOST)/bin/
33 $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs-lzma $(STAGING_DIR_HOST)/bin/
34 endef
35
36 define Host/Clean
37 rm -f $(STAGING_DIR_HOST)/bin/mksquashfs-lzma
38 rm -f $(STAGING_DIR_HOST)/bin/unsquashfs-lzma
39 endef
40
41 $(eval $(call HostBuild))