Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 1 | ################################################################################ |
| 2 | ## |
| 3 | ## This file is part of the coreboot project. |
| 4 | ## |
| 5 | ## Copyright (C) 2009-2010 coresystems GmbH |
| 6 | ## Copyright (C) 2015 Google Inc. |
| 7 | ## |
| 8 | ## This program is free software; you can redistribute it and/or modify |
| 9 | ## it under the terms of the GNU General Public License as published by |
| 10 | ## the Free Software Foundation; version 2 of the License. |
| 11 | ## |
| 12 | ## This program is distributed in the hope that it will be useful, |
| 13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | ## GNU General Public License for more details. |
| 16 | ## |
| 17 | ## You should have received a copy of the GNU General Public License |
| 18 | ## along with this program; if not, write to the Free Software |
| 19 | ## Foundation, Inc. |
| 20 | ## |
| 21 | |
Stefan Reinauer | d0d487a | 2015-07-14 15:57:44 -0700 | [diff] [blame] | 22 | ifeq ($(CONFIG_PAYLOAD_ELF),y) |
| 23 | COREBOOT_ROM_DEPENDENCIES+=$(CONFIG_PAYLOAD_FILE) |
| 24 | endif |
| 25 | ifeq ($(CONFIG_PAYLOAD_SEABIOS),y) |
| 26 | COREBOOT_ROM_DEPENDENCIES+=seabios |
| 27 | endif |
| 28 | ifeq ($(CONFIG_PAYLOAD_FILO),y) |
| 29 | COREBOOT_ROM_DEPENDENCIES+=filo |
| 30 | endif |
| 31 | ifeq ($(CONFIG_PAYLOAD_GRUB2),y) |
| 32 | COREBOOT_ROM_DEPENDENCIES+=grub2 |
| 33 | endif |
| 34 | |
Patrick Georgi | c983671 | 2015-08-08 21:35:38 +0200 | [diff] [blame] | 35 | SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1) |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 36 | seabios: |
| 37 | $(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc \ |
| 38 | HOSTCC="$(HOSTCC)" \ |
Patrick Georgi | 41fceaf | 2015-08-13 21:55:30 +0200 | [diff] [blame^] | 39 | CC=$(word $(SEABIOS_CC_OFFSET),$(CC_x86_32)) CFLAGS="$(patsubst $(word $(SEABIOS_CC_OFFSET),$(CC_x86_32))%,,$(wordlist $(SEABIOS_CC_OFFSET),9999,$(CC_x86_32)))" \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 40 | LD=$(word 1,$(LD_x86_32)) LDFLAGS="$(patsubst $(word 1,$(LD_x86_32))%,,$(LD_x86_32))" \ |
| 41 | OBJDUMP="$(OBJDUMP_x86_32)" \ |
| 42 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
| 43 | AS="$(AS_x86_32)" IASL="$(IASL)" \ |
| 44 | CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \ |
| 45 | CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \ |
| 46 | CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \ |
| 47 | CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \ |
| 48 | CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \ |
| 49 | CONFIG_TTYS0_BASE=$(CONFIG_TTYS0_BASE) \ |
| 50 | CONFIG_SEABIOS_MALLOC_UPPERMEMORY=$(CONFIG_SEABIOS_MALLOC_UPPERMEMORY) |
| 51 | |
| 52 | filo: |
| 53 | $(MAKE) -C payloads/external/FILO -f Makefile.inc \ |
| 54 | HOSTCC="$(HOSTCC)" \ |
| 55 | CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \ |
| 56 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
| 57 | CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \ |
| 58 | CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE) |
| 59 | |
| 60 | |
| 61 | grub2: |
| 62 | $(MAKE) -C payloads/external/GRUB2 -f Makefile.inc \ |
| 63 | HOSTCC="$(HOSTCC)" \ |
| 64 | CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \ |
| 65 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
| 66 | CONFIG_GRUB2_MASTER=$(CONFIG_GRUB2_MASTER) |