source: trunk/package/grub/Makefile @ 21184

Last change on this file since 21184 was 21184, checked in by acoul, 7 years ago

package/grub: fix cross compile options

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1#
2# Copyright (C) 2006-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=grub
12PKG_VERSION:=0.97
13PKG_RELEASE:=2
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=ftp://alpha.gnu.org/gnu/grub
17PKG_MD5SUM:=cd3f3eb54446be6003156158d51f4884
18
19PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/grub-$(PKG_VERSION)
20PKG_TARGETS:=bin
21
22include $(INCLUDE_DIR)/package.mk
23
24export grub_cv_prog_objcopy_absolute=yes
25
26define Package/grub
27  SECTION:=boot
28  DEPENDS:=@TARGET_x86
29  CATEGORY:=Boot Loaders
30  TITLE:=GRand Unified Bootloader
31  URL:=http://www.gnu.org/software/grub/
32endef
33
34CONFIGURE_FLAGS:= 
35
36ifneq ($(HOST_OS),Darwin)
37define Build/Configure
38        (cd $(PKG_BUILD_DIR); \
39                LDFLAGS="-static" \
40                ./configure \
41                $(CONFIGURE_FLAGS) \
42                --program-prefix="" \
43                --program-suffix="" \
44                --prefix=/usr \
45                --exec-prefix=/usr \
46                --bindir=/usr/bin \
47                --sbindir=/usr/sbin \
48                --libexecdir=/usr/lib \
49                --sysconfdir=/etc \
50                --datadir=/usr/share \
51                --localstatedir=/var \
52                --mandir=/usr/man \
53                --infodir=/usr/info \
54                $(DISABLE_NLS) \
55                --disable-auto-linux-mem-opt \
56        )
57endef
58
59#
60# ./configure detects whether the host compiler supports
61# -fno-stack-protector but only sets STAGE2_CFLAGS accordingly
62#
63define Build/Compile
64        $(MAKE) -C $(PKG_BUILD_DIR) \
65                GRUB_CFLAGS="\$$$$(STAGE2_CFLAGS)" \
66                STAGE1_CFLAGS="\$$$$(STAGE2_CFLAGS)"
67endef
68
69define Build/InstallDev
70        $(MAKE) -C $(PKG_BUILD_DIR) \
71                DESTDIR="$(STAGING_DIR_HOST)" \
72                install
73        mv $(STAGING_DIR_HOST)/usr/sbin/grub $(STAGING_DIR_HOST)/bin
74endef
75endif
76
77$(eval $(call BuildPackage,grub))
Note: See TracBrowser for help on using the repository browser.