2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=ftp
://alpha.gnu.org
/gnu
/grub
17 PKG_MD5SUM
:=cd3f3eb54446be6003156158d51f4884
19 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/grub-
$(PKG_VERSION
)
22 include $(INCLUDE_DIR
)/package.mk
24 export grub_cv_prog_objcopy_absolute
=yes
29 CATEGORY
:=Boot Loaders
30 TITLE
:=GRand Unified Bootloader
31 URL
:=http
://www.gnu.org
/software
/grub
/
36 ifneq ($(HOST_OS
),Darwin
)
37 define Build
/Configure
38 (cd
$(PKG_BUILD_DIR
); \
39 CFLAGS
="-march=i486 -m32" \
43 --build
=i386-linux-gnu \
44 --host
=i386-linux-gnu \
51 --libexecdir
=/usr
/lib \
53 --datadir=/usr
/share \
54 --localstatedir
=/var \
58 --disable-auto-linux-mem-opt \
63 # ./configure detects whether the host compiler supports
64 # -fno-stack-protector but only sets STAGE2_CFLAGS accordingly
67 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
68 GRUB_CFLAGS
="\$$$$(STAGE2_CFLAGS)" \
69 STAGE1_CFLAGS
="\$$$$(STAGE2_CFLAGS)"
72 define Build
/InstallDev
73 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
74 DESTDIR
="$(STAGING_DIR_HOST)" \
76 mv
$(STAGING_DIR_HOST
)/usr
/sbin
/grub
$(STAGING_DIR_HOST
)/bin
80 $(eval
$(call BuildPackage
,grub
))