add mkyaffs2image (based on android sources)
[librecmc/librecmc.git] / tools / yaffs2 / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=yaffs2_android
11 PKG_VERSION:=2008-12-18
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14 PKG_SOURCE_URL:=git://android.git.kernel.org/platform/external/yaffs2.git
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)
17 PKG_SOURCE_VERSION:=d333fc232d7e5ae3370080d5d6f7d88ea9c6b3a1
18 PKG_BUILD_DIR=$(BUILD_DIR_HOST)/$(PKG_NAME)
19
20 include $(INCLUDE_DIR)/host-build.mk
21
22 define Build/Compile
23         $(MAKE) -C $(PKG_BUILD_DIR)/yaffs2/utils \
24                 CFLAGS="$(HOST_CFLAGS) -include endian.h" \
25                 mkyaffs2image
26 endef
27
28 define Build/Install
29         $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
30         $(INSTALL_BIN) $(PKG_BUILD_DIR)/yaffs2/utils/mkyaffs2image $(STAGING_DIR_HOST)/bin/
31 endef
32
33 define Build/Clean
34         rm -f $(STAGING_DIR_HOST)/bin/mkyaffs2image
35 endef
36
37 $(eval $(call HostBuild))