[tools] add tool for squashfs4 image generation (w/o LZMA support)
[openwrt-10.03/.git] / tools / squashfs4 / Makefile
1 #
2 # Copyright (C) 2009 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.0
11
12 PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz
13 PKG_SOURCE_URL:=@SF/squashfs
14 PKG_MD5SUM:=a3c23391da4ebab0ac4a75021ddabf96
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                 mksquashfs unsquashfs
24 endef
25
26 define Host/Install
27         $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs $(STAGING_DIR_HOST)/bin/mksquashfs4
28         $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs $(STAGING_DIR_HOST)/bin/unsquashfs4
29 endef
30
31 define Host/Clean
32         rm -f $(STAGING_DIR_HOST)/bin/mksquashfs4
33         rm -f $(STAGING_DIR_HOST)/bin/unsquashfs4
34 endef
35
36 $(eval $(call HostBuild))