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
25 export grub_cv_prog_objcopy_absolute
=yes
30 CATEGORY
:=Boot Loaders
31 TITLE
:=GRand Unified Bootloader
32 URL
:=http
://www.gnu.org
/software
/grub
/
35 ifeq ($(HOST_OS
),Linux
)
38 NATIVEGRUB
:=$(NATIVEGRUB-
$(HOST_ARCH
))
43 --target
=$(GNU_TARGET_NAME
) \
44 --host
=$(GNU_TARGET_NAME
) \
45 --build
=$(GNU_HOST_NAME
)
50 ifneq ($(HOST_OS
),Darwin
)
51 define Build
/Configure
52 (cd
$(PKG_BUILD_DIR
); \
62 --libexecdir
=/usr
/lib \
64 --datadir=/usr
/share \
65 --localstatedir
=/var \
69 --disable-auto-linux-mem-opt \
74 # ./configure detects whether the host compiler supports
75 # -fno-stack-protector but only sets STAGE2_CFLAGS accordingly
78 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
79 GRUB_CFLAGS
="\$$$$(STAGE2_CFLAGS)" \
80 STAGE1_CFLAGS
="\$$$$(STAGE2_CFLAGS)"
83 define Build
/InstallDev
84 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
85 DESTDIR
="$(STAGING_DIR_HOST)" \
87 mv
$(STAGING_DIR_HOST
)/usr
/sbin
/grub
$(STAGING_DIR_HOST
)/bin
91 $(eval
$(call BuildPackage
,grub
))