don't set the kernelisaflags building grub2
[AROS.git] / arch / all-pc / boot / grub2-host / mmakefile.src
blob604710ceadbfe057bd2352a56d7533a0ffa3db11
1 # $Id$
3 include $(SRCDIR)/config/aros.cfg
5 #MM- arch-common-grub2-host : grub2-host-quick grub2-efi-host-quick 
6 #MM  grub2-iso-setup        : grub2-host-quick grub2-efi-host-quick grub2-aros-quick
7 #MM- bootloader-grub2       : arch-common-grub2
8 #MM- bootloader-grub2-isosetup : arch-common-grub2 grub2-iso-setup
9 #MM grub2-host : grub2-aros-fetch
10 #MM- grub2-host-quick : grub2-aros-fetch
11 #MM grub2-efi-host : grub2-aros-fetch
12 #MM- grub2-efi-host-quick : grub2-aros-fetch
14 BOOT_GRUB := $(AROSARCHDIR)/grub
15 BOOT_EFI  := $(AROSDIR)/EFI/BOOT/grub
16 GRUBSRCDIR := $(PORTSDIR)/grub/grub-$(GRUB2_VERSION)
18 $(BOOT_GRUB):
19         %mkdirs_q $@
21 $(BOOT_GRUB)/fonts:
22         %mkdirs_q $@
24 $(BOOT_GRUB)/i386-pc:
25         %mkdirs_q $@
27 $(BOOT_EFI):
28         %mkdirs_q $@
30 $(BOOT_EFI)/fonts:
31         %mkdirs_q $@
33 $(BOOT_EFI)/i386-efi:
34         %mkdirs_q $@
36 #MM
37 bootloader-grub2gfx-common: $(BOOT_GRUB)/splash.png $(BOOT_GRUB)/fonts/_unicode.pf2 $(BOOT_EFI)/splash.png $(BOOT_EFI)/fonts/_unicode.pf2
39 $(BOOT_GRUB)/splash.png: splash.png $(BOOT_GRUB)
40                 $(CP) $< $(BOOT_GRUB)
42 $(BOOT_GRUB)/fonts/_unicode.pf2: unicode.pf2 $(BOOT_GRUB)/fonts
43                 $(CP) $< $(BOOT_GRUB)/fonts/_unicode.pf2
45 $(BOOT_EFI)/splash.png: splash.png $(BOOT_EFI)
46                 $(CP) $< $(BOOT_EFI)
48 $(BOOT_EFI)/fonts/_unicode.pf2: unicode.pf2 $(BOOT_EFI)/fonts
49                 $(CP) $< $(BOOT_EFI)/fonts/_unicode.pf2
51 #MM
52 bootloader-grub2gfx-common-livecd: $(BOOT_GRUB)/fonts/unicode.pf2 $(BOOT_EFI)/fonts/unicode.pf2
54 $(BOOT_GRUB)/fonts/unicode.pf2: unicode.pf2 $(BOOT_GRUB)/fonts
55                 $(CP) $< $(BOOT_GRUB)
57 $(BOOT_EFI)/fonts/unicode.pf2: unicode.pf2 $(BOOT_EFI)/fonts
58                 $(CP) $< $(BOOT_EFI)
60 # avoid the make.tmpl s_flag in order to disable stripping of binaries
61 export DEBUG            := yes
62 # remove all flags, just in case
63 export HOST_CFLAGS      := 
64 export KERNEL_CFLAGS    := 
65 export CONFIG_LDFLAGS   :=
67 DESTDIR     :=  $(HOSTGENDIR)/$(CURDIR)/host_binaries
68 CONFIG_OPTS :=  --build=$(AROS_HOST_CPU)-$(AROS_HOST_ARCH)      \
69                 --host=$(AROS_HOST_CPU)-$(AROS_HOST_ARCH)       \
70                 --target=$(AROS_TARGET_CPU)                     \
71                 --datarootdir=$(DESTDIR)/share                  \
72                 --sysconfdir=$(DESTDIR)/etc                     \
73                 --disable-grub-mkfont                           \
74                 --disable-werror                                \
75                 --program-prefix=
77 grub2-host-touchfileflag := $(GENDIR)/arch/all-pc/boot/.grub2-files-touched
78 grub2-efi-host-touchfileflag := $(GENDIR)/arch/all-pc/boot/.grub2-files-touched
80 %build_with_configure mmake=grub2-host compiler=host nix=yes            \
81         prefix="$(DESTDIR)" srcdir=$(GRUBSRCDIR)        \
82         package=pc extraoptions="$(CONFIG_OPTS) --with-platform=pc"     \
83         install_target= kernelisaflags= targetisaflags=
85 %build_with_configure mmake=grub2-efi-host compiler=host nix=yes        \
86         prefix="$(DESTDIR)" srcdir=$(GRUBSRCDIR)        \
87         package=efi extraoptions="$(CONFIG_OPTS) --with-platform=efi"   \
88         install_target= kernelisaflags= targetisaflags=
90 PC_MODS     := biosdisk
91 EFI_MODS    :=
92 GRUB2_MODS  :=  fshelp part_msdos part_amiga part_gpt \
93                 fat ntfs ntfscomp affs sfs ext2 hfsplus iso9660 \
94                 minicmd
95 LST_FILES   :=  command fs moddep
96 MKIMG_OPTS  :=  -O i386-pc -p /$(AROS_DIR_ARCH)/grub
97 MKIMG_EFI   :=  -O $(AROS_TARGET_CPU)-efi -p /EFI/BOOT/grub
99 ifeq ($(CPU),x86_64)
100     EFI_GRUB_IMG := BOOTX64.EFI
101 else
102     EFI_GRUB_IMG := BOOTIA32.EFI
103 endif
106 grub2-iso-setup: grub2-pc-iso-setup grub2-efi-iso-setup
109 grub2-pc-iso-setup: $(BOOT_GRUB)/i386-pc
110         @$(ECHO) Creating $(BOOT_GRUB)...
111         @cd $(HOSTGENDIR)/$(CURDIR)/pc/grub-core                                && \
112         ../grub-mkimage $(MKIMG_OPTS) -d . -o core.img $(PC_MODS) $(GRUB2_MODS) && \
113         $(CP) *.img $(BOOT_GRUB)/i386-pc                                        && \
114         $(CP) *.mod $(BOOT_GRUB)/i386-pc                                        && \
115         $(CP) $(addsuffix .lst,$(LST_FILES)) $(BOOT_GRUB)/i386-pc               && \
116         $(CAT) cdboot.img core.img > $(BOOT_GRUB)/i386-pc/grub2_eltorito
119 grub2-efi-iso-setup: $(BOOT_EFI)/i386-efi
120         @$(ECHO) Creating $(BOOT_EFI)...
121         @cd $(HOSTGENDIR)/$(CURDIR)/efi/grub-core                               && \
122         ../grub-mkimage $(MKIMG_EFI) -d . -o grub.efi $(EFI_MODS) $(GRUB2_MODS) && \
123         $(CP) grub.efi $(AROSDIR)/EFI/BOOT/$(EFI_GRUB_IMG)                      && \
124         $(CP) *.mod $(BOOT_EFI)/i386-efi                                                && \
125         $(CP) $(addsuffix .lst,$(LST_FILES)) $(BOOT_EFI)/i386-efi
127 %common