new (last?) attempt at standardizing Makefiles
[openwrt/staging/dedeckeh.git] / openwrt / toolchain / ext2fs / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=genext2fs
12 PKG_VERSION:=1.4rc1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
16 PKG_MD5SUM:=664431bf6737df1c265500e1f0b5d40c
17 PKG_CAT:=zcat
18
19 PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/host-build.mk
22
23 define Build/Configure
24 ( cd $(PKG_BUILD_DIR); \
25 ./configure \
26 --target=$(GNU_HOST_NAME) \
27 --host=$(GNU_HOST_NAME) \
28 --build=$(GNU_HOST_NAME) \
29 --program-prefix="" \
30 --program-suffix="" \
31 --prefix=/usr \
32 --exec-prefix=/usr \
33 --bindir=/usr/bin \
34 --sbindir=/usr/sbin \
35 --libexecdir=/usr/lib \
36 --sysconfdir=/etc \
37 --datadir=/usr/share \
38 --localstatedir=/var \
39 --mandir=/usr/man \
40 --infodir=/usr/info \
41 )
42 endef
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) all
46 endef
47
48 define Build/Install
49 mkdir -p $(STAGING_DIR)/bin
50 install -m0755 $(PKG_BUILD_DIR)/genext2fs $(STAGING_DIR)/bin/
51 endef
52
53 define Build/Clean
54 rm -f $(STAGING_DIR)/bin/genext2fs
55 endef
56
57 $(eval $(call HostBuild))