2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # $Id: Makefile 4855 2006-09-24 20:49:31Z nico $
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=ftp
://alpha.gnu.org
/gnu
/grub
18 PKG_MD5SUM
:=cd3f3eb54446be6003156158d51f4884
20 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/grub-
$(PKG_VERSION
)
23 include $(INCLUDE_DIR
)/package.mk
28 CATEGORY
:=Boot Loaders
29 TITLE
:=GRand Unified Bootloader
30 URL
:=http
://www.gnu.org
/software
/grub
/
33 ifeq ($(HOST_OS
),Linux
)
36 NATIVEGRUB
:=$(NATIVEGRUB-
$(HOST_ARCH
))
41 --target
=$(GNU_TARGET_NAME
) \
42 --host
=$(GNU_TARGET_NAME
) \
43 --build
=$(GNU_HOST_NAME
)
48 define Build
/Configure
49 (cd
$(PKG_BUILD_DIR
); \
59 --libexecdir
=/usr
/lib \
61 --datadir=/usr
/share \
62 --localstatedir
=/var \
66 --disable-auto-linux-mem-opt \
71 # ./configure detects whether the host compiler supports
72 # -fno-stack-protector but only sets STAGE2_CFLAGS accordingly
75 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
76 GRUB_CFLAGS
="\$$$$(STAGE2_CFLAGS)" \
77 STAGE1_CFLAGS
="\$$$$(STAGE2_CFLAGS)"
80 define Build
/InstallDev
81 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
82 DESTDIR
="$(STAGING_DIR_HOST)" \
84 mv
$(STAGING_DIR_HOST
)/usr
/sbin
/grub
$(STAGING_DIR_HOST
)/bin
87 $(eval
$(call BuildPackage
,grub
))