[tools]: add e2fsprogs to tools and use that instead of libuuid
[openwrt.git] / tools / e2fsprogs / Makefile
1 #
2 # Copyright (C) 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:=e2fsprogs
11 PKG_VERSION:=1.41.10
12 PKG_MD5SUM:=f9c7bb5c036a119453ce02fa871038da
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/e2fsprogs
17
18 include $(INCLUDE_DIR)/host-build.mk
19
20 define Host/Configure
21         ( cd $(HOST_BUILD_DIR); \
22                 ./configure \
23                         --target=$(GNU_HOST_NAME) \
24                         --host=$(GNU_HOST_NAME) \
25                         --build=$(GNU_HOST_NAME) \
26                         --program-prefix="" \
27                         --program-suffix="" \
28                         --prefix=/usr \
29                         --exec-prefix=/usr \
30                         --bindir=/usr/bin \
31                         --sbindir=/usr/sbin \
32                         --libexecdir=/usr/lib \
33                         --sysconfdir=/etc \
34                         --datadir=/usr/share \
35                         --localstatedir=/var \
36                         --mandir=/usr/man \
37                         --infodir=/usr/info \
38         )
39 endef
40
41 TARGET_CFLAGS += $(FPIC)
42
43 CONFIGURE_ARGS += \
44         --enable-shared \
45         --enable-static \
46         --disable-rpath \
47         --enable-elf-shlibs \
48         --enable-dynamic-e2fsck \
49         --disable-tls
50
51 define Host/Compile
52         $(MAKE) -C $(HOST_BUILD_DIR) \
53                 CFLAGS="$(HOST_CFLAGS)" all
54 endef
55
56 define Host/Install
57         install -m0755 $(HOST_BUILD_DIR)/e2fsck/e2fsck $(STAGING_DIR_HOST)/bin/
58         install -m0755 $(HOST_BUILD_DIR)/misc/tune2fs $(STAGING_DIR_HOST)/bin/
59 endef
60
61 define Host/Clean
62         rm -f $(STAGING_DIR_HOST)/bin/e2fsck
63         rm -f $(STAGING_DIR_HOST)/bin/tune2fs
64 endef
65
66 $(eval $(call HostBuild))