tools/mtd-utils: update to 2.1.1
[openwrt/staging/jow.git] / tools / mtd-utils / Makefile
1 #
2 # Copyright (C) 2006-2015 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:=mtd-utils
10 PKG_VERSION:=2.1.1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
13 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/
14 PKG_HASH:=8d15e8b70f036d6af1a66011f8ca0e048e9675fa7983d33bea92c24313a232d2
15
16 PKG_FIXUP:=autoreconf
17
18 include $(INCLUDE_DIR)/host-build.mk
19
20 ifneq ($(HOST_OS),Linux)
21 HOST_CFLAGS += \
22 -I$(CURDIR)/include \
23 -Dloff_t=off_t \
24 -D__BYTE_ORDER=BYTE_ORDER \
25 -include endian.h \
26 -DNO_NATIVE_SUPPORT \
27 -include fls.h
28 endif
29
30 HOST_CONFIGURE_VARS+= \
31 UUID_CFLAGS="-I$(STAGING_DIR_HOST)/include/e2fsprogs/uuid"
32
33 HOST_CONFIGURE_ARGS+= \
34 --disable-tests \
35 --without-crypto \
36 --without-xattr \
37 --without-zstd \
38 --without-lzo
39
40 HOST_MAKE_FLAGS += \
41 PROGRAMS="mkfs.jffs2 ubinize mkfs.ubifs"
42
43 define Host/Install
44 $(CP) \
45 $(HOST_BUILD_DIR)/mkfs.jffs2 \
46 $(HOST_BUILD_DIR)/mkfs.ubifs \
47 $(HOST_BUILD_DIR)/ubinize \
48 $(STAGING_DIR_HOST)/bin/
49 endef
50
51 define Host/Clean
52 rm -f $(STAGING_DIR_HOST)/bin/{mkfs.jffs2,mkfs.ubifs,ubinize}
53 endef
54
55 $(eval $(call HostBuild))