trivial changes
[openwrt/staging/chunkeey.git] / target / image / x86 / grub / 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: Makefile 4855 2006-09-24 20:49:31Z nico $
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=grub
13 PKG_VERSION:=0.97
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=ftp://alpha.gnu.org/gnu/grub
18 PKG_MD5SUM:=cd3f3eb54446be6003156158d51f4884
19 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/grub-$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/package.mk
24
25 ifeq ($(HOST_ARCH),x86_64)
26 define Build/Configure
27 (cd $(PKG_BUILD_DIR); \
28 LDFLAGS="-static" \
29 ./configure \
30 --target=$(GNU_TARGET_NAME) \
31 --host=$(GNU_TARGET_NAME) \
32 --build=$(GNU_HOST_NAME) \
33 --program-prefix="" \
34 --program-suffix="" \
35 --prefix=/usr \
36 --exec-prefix=/usr \
37 --bindir=/usr/bin \
38 --sbindir=/usr/sbin \
39 --libexecdir=/usr/lib \
40 --sysconfdir=/etc \
41 --datadir=/usr/share \
42 --localstatedir=/var \
43 --mandir=/usr/man \
44 --infodir=/usr/info \
45 $(DISABLE_NLS) \
46 )
47 endef
48 else
49 define Build/Configure
50 (cd $(PKG_BUILD_DIR); \
51 LDFLAGS="-static" \
52 ./configure \
53 --program-prefix="" \
54 --program-suffix="" \
55 --prefix=/usr \
56 --exec-prefix=/usr \
57 --bindir=/usr/bin \
58 --sbindir=/usr/sbin \
59 --libexecdir=/usr/lib \
60 --sysconfdir=/etc \
61 --datadir=/usr/share \
62 --localstatedir=/var \
63 --mandir=/usr/man \
64 --infodir=/usr/info \
65 )
66 endef
67 endif
68
69 define Build/Compile
70 $(MAKE) -C $(PKG_BUILD_DIR)
71 endef
72
73 define Build/InstallDev
74 $(MAKE) -C $(PKG_BUILD_DIR) \
75 DESTDIR="$(STAGING_DIR)" \
76 install
77 endef
78
79 $(eval $(call Build/DefaultTargets))