wdenk | 2262cfe | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2002-2006 |
wdenk | 2262cfe | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | # SPDX-License-Identifier: GPL-2.0+ |
wdenk | 2262cfe | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 6 | # |
| 7 | |
Simon Glass | 05cbd98 | 2017-01-16 07:04:09 -0700 | [diff] [blame] | 8 | ifndef CONFIG_X86_64 |
Simon Glass | 0ca2426 | 2014-11-14 20:56:32 -0700 | [diff] [blame] | 9 | obj-y += bios.o |
| 10 | obj-y += bios_asm.o |
| 11 | obj-y += bios_interrupts.o |
Simon Glass | 05cbd98 | 2017-01-16 07:04:09 -0700 | [diff] [blame] | 12 | endif |
Simon Glass | ca5114f | 2017-01-16 07:04:13 -0700 | [diff] [blame] | 13 | ifndef CONFIG_SPL_BUILD |
Masahiro Yamada | 3954b73 | 2013-10-21 11:53:34 +0900 | [diff] [blame] | 14 | obj-$(CONFIG_CMD_BOOTM) += bootm.o |
Simon Glass | ca5114f | 2017-01-16 07:04:13 -0700 | [diff] [blame] | 15 | endif |
Masahiro Yamada | 3954b73 | 2013-10-21 11:53:34 +0900 | [diff] [blame] | 16 | obj-y += cmd_boot.o |
Bin Meng | 5483449 | 2016-05-11 07:44:58 -0700 | [diff] [blame] | 17 | obj-$(CONFIG_SEABIOS) += coreboot_table.o |
Simon Glass | 8e36650 | 2015-08-04 12:34:01 -0600 | [diff] [blame] | 18 | obj-$(CONFIG_EFI) += efi/ |
Bin Meng | 59ec719 | 2015-10-07 20:19:10 -0700 | [diff] [blame] | 19 | obj-y += e820.o |
Masahiro Yamada | 3954b73 | 2013-10-21 11:53:34 +0900 | [diff] [blame] | 20 | obj-y += gcc.o |
| 21 | obj-y += init_helpers.o |
| 22 | obj-y += interrupts.o |
Simon Glass | a274e9c | 2015-03-26 09:29:28 -0600 | [diff] [blame] | 23 | obj-y += lpc-uclass.o |
Bin Meng | 7f5df8d | 2015-06-23 12:18:51 +0800 | [diff] [blame] | 24 | obj-y += mpspec.o |
Bin Meng | f6220f1 | 2015-10-11 21:37:36 -0700 | [diff] [blame] | 25 | obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o |
Simon Glass | cb3b2e6 | 2015-01-01 16:18:15 -0700 | [diff] [blame] | 26 | obj-y += cmd_mtrr.o |
Simon Glass | 5544757 | 2016-01-17 16:11:14 -0700 | [diff] [blame] | 27 | obj-y += northbridge-uclass.o |
Bin Meng | da3fe24 | 2015-10-22 19:13:30 -0700 | [diff] [blame] | 28 | obj-$(CONFIG_I8259_PIC) += i8259.o |
| 29 | obj-$(CONFIG_I8254_TIMER) += i8254.o |
Simon Glass | 7ac99be | 2016-03-11 22:07:13 -0700 | [diff] [blame] | 30 | obj-y += pinctrl_ich6.o |
Bin Meng | b5b6b01 | 2015-04-24 18:10:05 +0800 | [diff] [blame] | 31 | obj-y += pirq_routing.o |
Masahiro Yamada | 3954b73 | 2013-10-21 11:53:34 +0900 | [diff] [blame] | 32 | obj-y += relocate.o |
| 33 | obj-y += physmem.o |
Simon Glass | 65dd74a | 2014-11-12 22:42:28 -0700 | [diff] [blame] | 34 | obj-$(CONFIG_X86_RAMTEST) += ramtest.o |
Felipe Balbi | bb41646 | 2017-04-01 16:21:33 +0300 | [diff] [blame^] | 35 | obj-$(CONFIG_INTEL_MID) += scu.o |
Simon Glass | 65e4c0b | 2016-09-25 15:27:35 -0600 | [diff] [blame] | 36 | obj-y += sections.o |
Simon Glass | 6388e35 | 2015-04-28 20:25:10 -0600 | [diff] [blame] | 37 | obj-y += sfi.o |
Masahiro Yamada | 3954b73 | 2013-10-21 11:53:34 +0900 | [diff] [blame] | 38 | obj-y += string.o |
Miao Yan | 34865a6 | 2016-05-22 19:37:10 -0700 | [diff] [blame] | 39 | ifndef CONFIG_QEMU |
Saket Sinha | 867bcb6 | 2015-08-22 12:20:55 +0530 | [diff] [blame] | 40 | obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o |
Miao Yan | fa287b1 | 2016-01-20 01:57:06 -0800 | [diff] [blame] | 41 | endif |
Bin Meng | 5e2400e | 2015-04-24 18:10:04 +0800 | [diff] [blame] | 42 | obj-y += tables.o |
Simon Glass | ca5114f | 2017-01-16 07:04:13 -0700 | [diff] [blame] | 43 | ifndef CONFIG_SPL_BUILD |
Masahiro Yamada | 3954b73 | 2013-10-21 11:53:34 +0900 | [diff] [blame] | 44 | obj-$(CONFIG_CMD_ZBOOT) += zimage.o |
Simon Glass | ca5114f | 2017-01-16 07:04:13 -0700 | [diff] [blame] | 45 | endif |
Simon Glass | 1021af4 | 2015-01-27 22:13:36 -0700 | [diff] [blame] | 46 | obj-$(CONFIG_HAVE_FSP) += fsp/ |
Simon Glass | 4bbc024 | 2017-01-16 07:03:56 -0700 | [diff] [blame] | 47 | obj-$(CONFIG_SPL_BUILD) += spl.o |
wdenk | 2262cfe | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 48 | |
Simon Glass | b997abd | 2015-08-04 12:33:53 -0600 | [diff] [blame] | 49 | extra-$(CONFIG_USE_PRIVATE_LIBGCC) += lib.a |
wdenk | 2262cfe | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 50 | |
Masahiro Yamada | dd43fa2 | 2014-10-24 01:30:41 +0900 | [diff] [blame] | 51 | NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name) |
Masahiro Yamada | b6e53eb | 2014-03-11 11:05:13 +0900 | [diff] [blame] | 52 | OBJCOPYFLAGS := --prefix-symbols=__normal_ |
Masahiro Yamada | dd43fa2 | 2014-10-24 01:30:41 +0900 | [diff] [blame] | 53 | $(obj)/lib.a: $(NORMAL_LIBGCC) FORCE |
Masahiro Yamada | b6e53eb | 2014-03-11 11:05:13 +0900 | [diff] [blame] | 54 | $(call if_changed,objcopy) |
Simon Glass | 2dcd4e9 | 2016-11-07 08:47:14 -0700 | [diff] [blame] | 55 | |
Simon Glass | e1b610b | 2017-01-16 07:04:12 -0700 | [diff] [blame] | 56 | ifeq ($(CONFIG_$(SPL_)X86_64),) |
Simon Glass | 2dcd4e9 | 2016-11-07 08:47:14 -0700 | [diff] [blame] | 57 | obj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o |
Simon Glass | e1b610b | 2017-01-16 07:04:12 -0700 | [diff] [blame] | 58 | endif |
Simon Glass | 2dcd4e9 | 2016-11-07 08:47:14 -0700 | [diff] [blame] | 59 | |
| 60 | ifneq ($(CONFIG_EFI_STUB),) |
| 61 | |
| 62 | CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3 |
| 63 | CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar |
| 64 | |
| 65 | # When building for 64-bit we must remove the i386-specific flags |
| 66 | CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32 |
| 67 | CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar |
| 68 | |
| 69 | AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32 |
| 70 | AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar |
| 71 | |
| 72 | extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o |
| 73 | extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o |
Simon Glass | 5bd828b | 2016-11-07 08:47:15 -0700 | [diff] [blame] | 74 | |
| 75 | endif |
| 76 | |
Alexander Graf | 95b62b2 | 2016-11-17 22:40:10 +0100 | [diff] [blame] | 77 | ifneq ($(CONFIG_EFI_STUB)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),) |
Simon Glass | e1b610b | 2017-01-16 07:04:12 -0700 | [diff] [blame] | 78 | ifeq ($(CONFIG_$(SPL_)X86_64),) |
Simon Glass | 5bd828b | 2016-11-07 08:47:15 -0700 | [diff] [blame] | 79 | extra-y += $(EFI_CRT0) $(EFI_RELOC) |
Simon Glass | 2dcd4e9 | 2016-11-07 08:47:14 -0700 | [diff] [blame] | 80 | endif |
Simon Glass | e1b610b | 2017-01-16 07:04:12 -0700 | [diff] [blame] | 81 | endif |