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 CFLAGS
:= $(HOST_CFLAGS
) -I
$(HOST_BUILD_DIR
)/include -L
$(HOST_BUILD_DIR
) -L
$(STAGING_DIR_HOST
)/lib
-DNO_NATIVE_SUPPORT
25 ifneq ($(HOST_OS
),Linux
)
26 CFLAGS
+= -Dloff_t
=off_t
-D__BYTE_ORDER
=BYTE_ORDER
-include getline.h
-include endian.h
-I
$(CURDIR
)/include -include fls.h
31 NO_LZO
=1 WITHOUT_XATTR
=1 \
33 BUILDDIR
="$(HOST_BUILD_DIR)"
36 $(MAKE
) -C
$(HOST_BUILD_DIR
)/lib \
38 TARGETS
="libmtd.a libcrc32.a" \
39 LIBS
="libmtd libcrc32"
40 $(MAKE
) -C
$(HOST_BUILD_DIR
) \
43 $(MAKE
) -C
$(HOST_BUILD_DIR
)/ubi-utils \
46 $(MAKE
) -C
$(HOST_BUILD_DIR
)/mkfs.ubifs \
48 BUILDDIR
="$(HOST_BUILD_DIR)/mkfs.ubifs"
53 $(HOST_BUILD_DIR
)/mkfs.jffs2 \
54 $(HOST_BUILD_DIR
)/mkfs.ubifs
/mkfs.ubifs \
55 $(HOST_BUILD_DIR
)/ubinize \
56 $(STAGING_DIR_HOST
)/bin
/
60 rm -f
$(STAGING_DIR_HOST
)/bin
/{mkfs.jffs2
,mkfs.ubifs
,ubinize
}
63 $(eval
$(call HostBuild
))