[packages/mtd-utils] split mtd-utils into its single components
[openwrt/svn-archive/archive.git] / utils / mtd-utils / Makefile
1 #
2 # Copyright (C) 2009-2010 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:=mtd-utils
11 PKG_REV:=a2d010f8fca904fffa3c6e5a5d148cc96a37a08a
12 PKG_VERSION:=20090227
13 PKG_RELEASE:=1
14 PKG_INSTALL:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
18 PKG_SOURCE_PROTO:=git
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20 PKG_SOURCE_VERSION:=$(PKG_REV)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 FILES:= \
25 ubiupdatevol \
26 flash_otp_info \
27 nandtest \
28 ubimkvol \
29 ubigen \
30 serve_image \
31 recv_image \
32 ubinfo \
33 ubirename \
34 mkpfi \
35 nandwrite \
36 flash_eraseall \
37 mkbootenv \
38 ftl_format \
39 nand2bin \
40 ubiattach \
41 nftl_format \
42 nanddump \
43 ubinize \
44 docfdisk \
45 ubimirror \
46 ubicrc32.pl \
47 ftl_check \
48 flashcp \
49 jffs2dump \
50 ubiformat \
51 ubidetach \
52 flash_lock \
53 bin2nand \
54 pfiflash \
55 mtd_debug \
56 pddcustomize \
57 flash_unlock \
58 doc_loadbios \
59 nftldump \
60 mkfs.jffs2 \
61 flash_info \
62 ubicrc32 \
63 ubirmvol \
64 unubi \
65 pfi2bin \
66 mkfs.ubifs \
67 sumtool \
68 flash_erase \
69 rfddump \
70 flash_otp_dump \
71 rfdformat
72
73 define PartGen
74 define Package/mtd-utils-$(1)
75 TITLE:=MTD $(1)
76 URL:=http://www.linux-mtd.infradead.org/
77 SECTION:=utils
78 CATEGORY:=Utilities
79 DEPENDS:=mtd-utils +zlib +liblzo +libuuid
80 endef
81 endef
82
83 define Package/mtd-utils
84 TITLE:=Utilities for flash info/debug
85 SECTION:=utils
86 CATEGORY:=Utilities
87 MENU:=1
88 endef
89
90 define Package/mtd-utils/description
91 Utilities for manipulating memory technology devices.
92 endef
93
94 $(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
95
96 MAKE_FLAGS += \
97 DESTDIR="$(PKG_INSTALL_DIR)" \
98 BUILDDIR="$(PKG_BUILD_DIR)" \
99 LDLIBS+="$(LIBGCC_S)" \
100 WITHOUT_XATTR=1
101
102 ifeq ($(CONFIG_LINUX_2_4),y)
103 MAKE_FLAGS += \
104 SUBDIRS=""
105 endif
106
107 define PartInstall
108 define Package/mtd-utils-$(1)/install
109 $(INSTALL_DIR) \
110 $$(1)/usr/sbin
111
112 $(INSTALL_BIN) \
113 $(PKG_INSTALL_DIR)/usr/sbin/$(1) \
114 $$(1)/usr/sbin/
115 endef
116 endef
117
118 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
119
120 $(eval $(call BuildPackage,mtd-utils))
121 $(foreach file,$(FILES),$(eval $(call BuildPackage,mtd-utils-$(file))))