blob: fe00d7573f5147c5efa09dd45194e34e23c487ff [file] [log] [blame]
wdenk591dda52002-11-18 00:14:45 +00001#
Marian Balakowiczd62379d2006-09-01 19:49:50 +02002# (C) Copyright 2002-2006
wdenk591dda52002-11-18 00:14:45 +00003# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenk591dda52002-11-18 00:14:45 +00006#
7
Simon Glass3dfe4512017-01-16 07:04:09 -07008ifndef CONFIG_X86_64
Simon Glassb2978d32014-11-14 20:56:32 -07009obj-y += bios.o
10obj-y += bios_asm.o
11obj-y += bios_interrupts.o
Simon Glass3dfe4512017-01-16 07:04:09 -070012endif
Simon Glass602b98f2017-01-16 07:04:13 -070013ifndef CONFIG_SPL_BUILD
Masahiro Yamadaaa96dd12013-10-21 11:53:34 +090014obj-$(CONFIG_CMD_BOOTM) += bootm.o
Simon Glass602b98f2017-01-16 07:04:13 -070015endif
Masahiro Yamadaaa96dd12013-10-21 11:53:34 +090016obj-y += cmd_boot.o
Bin Menge31a79a2016-05-11 07:44:58 -070017obj-$(CONFIG_SEABIOS) += coreboot_table.o
Bin Meng39f8b082017-04-21 07:24:38 -070018obj-y += early_cmos.o
Simon Glassd2269f22015-08-04 12:34:01 -060019obj-$(CONFIG_EFI) += efi/
Bin Menga4899632015-10-07 20:19:10 -070020obj-y += e820.o
Masahiro Yamadaaa96dd12013-10-21 11:53:34 +090021obj-y += gcc.o
22obj-y += init_helpers.o
23obj-y += interrupts.o
Simon Glassa5caa372015-03-26 09:29:28 -060024obj-y += lpc-uclass.o
Bin Mengf91cf6b2015-06-23 12:18:51 +080025obj-y += mpspec.o
Bin Meng21666cf2015-10-11 21:37:36 -070026obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
Simon Glassfc0ba2d2015-01-01 16:18:15 -070027obj-y += cmd_mtrr.o
Simon Glass29ce97e2016-01-17 16:11:14 -070028obj-y += northbridge-uclass.o
Bin Mengb29a08c2015-10-22 19:13:30 -070029obj-$(CONFIG_I8259_PIC) += i8259.o
30obj-$(CONFIG_I8254_TIMER) += i8254.o
Simon Glass11cd6312016-03-11 22:07:13 -070031obj-y += pinctrl_ich6.o
Bin Meng45236ad2015-04-24 18:10:05 +080032obj-y += pirq_routing.o
Masahiro Yamadaaa96dd12013-10-21 11:53:34 +090033obj-y += relocate.o
34obj-y += physmem.o
Andy Shevchenko7d2c2012017-04-01 16:21:34 +030035obj-$(CONFIG_INTEL_MID) += pmu.o
Simon Glass268eefd2014-11-12 22:42:28 -070036obj-$(CONFIG_X86_RAMTEST) += ramtest.o
Felipe Balbiee2e85f2017-04-01 16:21:33 +030037obj-$(CONFIG_INTEL_MID) += scu.o
Simon Glasscdfe6962016-09-25 15:27:35 -060038obj-y += sections.o
Simon Glass07e922a2015-04-28 20:25:10 -060039obj-y += sfi.o
Masahiro Yamadaaa96dd12013-10-21 11:53:34 +090040obj-y += string.o
Bin Meng710d2152017-04-21 07:24:37 -070041obj-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.o
Miao Yan75e27da2016-05-22 19:37:10 -070042ifndef CONFIG_QEMU
Saket Sinha331141a2015-08-22 12:20:55 +053043obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
Miao Yan3b68c522016-01-20 01:57:06 -080044endif
Bin Mengf17cea62015-04-24 18:10:04 +080045obj-y += tables.o
Simon Glass602b98f2017-01-16 07:04:13 -070046ifndef CONFIG_SPL_BUILD
Masahiro Yamadaaa96dd12013-10-21 11:53:34 +090047obj-$(CONFIG_CMD_ZBOOT) += zimage.o
Simon Glass602b98f2017-01-16 07:04:13 -070048endif
Simon Glassb93abfc2015-01-27 22:13:36 -070049obj-$(CONFIG_HAVE_FSP) += fsp/
Simon Glass030777d2017-01-16 07:03:56 -070050obj-$(CONFIG_SPL_BUILD) += spl.o
wdenk591dda52002-11-18 00:14:45 +000051
Simon Glass9e72e642015-08-04 12:33:53 -060052extra-$(CONFIG_USE_PRIVATE_LIBGCC) += lib.a
wdenk591dda52002-11-18 00:14:45 +000053
Masahiro Yamada30704462014-10-24 01:30:41 +090054NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
Masahiro Yamada46230b62014-03-11 11:05:13 +090055OBJCOPYFLAGS := --prefix-symbols=__normal_
Masahiro Yamada30704462014-10-24 01:30:41 +090056$(obj)/lib.a: $(NORMAL_LIBGCC) FORCE
Masahiro Yamada46230b62014-03-11 11:05:13 +090057 $(call if_changed,objcopy)
Simon Glass6f4b08a2016-11-07 08:47:14 -070058
Simon Glass2f1492e2017-01-16 07:04:12 -070059ifeq ($(CONFIG_$(SPL_)X86_64),)
Simon Glass6f4b08a2016-11-07 08:47:14 -070060obj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
Simon Glass2f1492e2017-01-16 07:04:12 -070061endif
Simon Glass6f4b08a2016-11-07 08:47:14 -070062
63ifneq ($(CONFIG_EFI_STUB),)
64
65CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
66CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
67
68# When building for 64-bit we must remove the i386-specific flags
69CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
70CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar
71
72AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
73AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar
74
75extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
76extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
Simon Glass105c9362016-11-07 08:47:15 -070077
78endif
79
Alexander Grafb5483512016-11-17 22:40:10 +010080ifneq ($(CONFIG_EFI_STUB)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
Simon Glass2f1492e2017-01-16 07:04:12 -070081ifeq ($(CONFIG_$(SPL_)X86_64),)
Simon Glass105c9362016-11-07 08:47:15 -070082extra-y += $(EFI_CRT0) $(EFI_RELOC)
Simon Glass6f4b08a2016-11-07 08:47:14 -070083endif
Simon Glass2f1492e2017-01-16 07:04:12 -070084endif