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
:=5319b84974fcb71504aed2d1b8285e9c0a4a4bb8
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
19 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 include $(INCLUDE_DIR
)/host-build.mk
23 HOST_CFLAGS
+= -I
$(STAGING_DIR_HOST
)/include/e2fsprogs
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 WITHOUT_LZO
=1 WITHOUT_XATTR
=1 \
32 LZMA_STATIC_LIB
="$(STAGING_DIR_HOST)/lib/liblzma.a" \
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
))