2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
12 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
13 PKG_SOURCE_URL
:=git
://git.infradead.org
/mtd-utils.git
15 PKG_SOURCE_VERSION
:=c1a7889da754dfac2f130772daef783980c65d5d
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_MD5SUM
:=78e5e74957f458bd808a6d4af0a38071
20 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 include $(INCLUDE_DIR
)/host-build.mk
24 HOST_CFLAGS
+= -I
$(STAGING_DIR_HOST
)/include/e2fsprogs
25 CFLAGS
:= $(HOST_CFLAGS
) -I
$(HOST_BUILD_DIR
)/include -L
$(HOST_BUILD_DIR
) -L
$(STAGING_DIR_HOST
)/lib
-DNO_NATIVE_SUPPORT
26 ifneq ($(HOST_OS
),Linux
)
27 CFLAGS
+= -Dloff_t
=off_t
-D__BYTE_ORDER
=BYTE_ORDER
-include getline.h
-include endian.h
-I
$(CURDIR
)/include -include fls.h
32 NO_LZO
=1 WITHOUT_XATTR
=1 \
34 BUILDDIR
="$(HOST_BUILD_DIR)"
37 $(MAKE
) -C
$(HOST_BUILD_DIR
)/lib \
39 TARGETS
="libmtd.a libcrc32.a" \
40 LIBS
="libmtd libcrc32"
41 $(MAKE
) -C
$(HOST_BUILD_DIR
) \
44 $(MAKE
) -C
$(HOST_BUILD_DIR
)/ubi-utils \
47 $(MAKE
) -C
$(HOST_BUILD_DIR
)/mkfs.ubifs \
49 BUILDDIR
="$(HOST_BUILD_DIR)/mkfs.ubifs"
54 $(HOST_BUILD_DIR
)/mkfs.jffs2 \
55 $(HOST_BUILD_DIR
)/mkfs.ubifs
/mkfs.ubifs \
56 $(HOST_BUILD_DIR
)/ubinize \
57 $(STAGING_DIR_HOST
)/bin
/
61 rm -f
$(STAGING_DIR_HOST
)/bin
/{mkfs.jffs2
,mkfs.ubifs
,ubinize
}
64 $(eval
$(call HostBuild
))