blob: 05e212f9bf3a6a0215150cefbd2f0d5244f235d4 [file] [log] [blame]
wdenk2262cfe2002-11-18 00:14:45 +00001#
Marian Balakowiczf9328632006-09-01 19:49:50 +02002# (C) Copyright 2002-2006
wdenk2262cfe2002-11-18 00:14:45 +00003# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denk1a459662013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenk2262cfe2002-11-18 00:14:45 +00006#
7
Simon Glass05cbd982017-01-16 07:04:09 -07008ifndef CONFIG_X86_64
Simon Glass0ca24262014-11-14 20:56:32 -07009obj-y += bios.o
10obj-y += bios_asm.o
11obj-y += bios_interrupts.o
Simon Glass05cbd982017-01-16 07:04:09 -070012endif
Masahiro Yamada3954b732013-10-21 11:53:34 +090013obj-$(CONFIG_CMD_BOOTM) += bootm.o
14obj-y += cmd_boot.o
Bin Meng54834492016-05-11 07:44:58 -070015obj-$(CONFIG_SEABIOS) += coreboot_table.o
Simon Glass8e366502015-08-04 12:34:01 -060016obj-$(CONFIG_EFI) += efi/
Bin Meng59ec7192015-10-07 20:19:10 -070017obj-y += e820.o
Masahiro Yamada3954b732013-10-21 11:53:34 +090018obj-y += gcc.o
19obj-y += init_helpers.o
20obj-y += interrupts.o
Simon Glassa274e9c2015-03-26 09:29:28 -060021obj-y += lpc-uclass.o
Bin Meng7f5df8d2015-06-23 12:18:51 +080022obj-y += mpspec.o
Bin Mengf6220f12015-10-11 21:37:36 -070023obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
Simon Glasscb3b2e62015-01-01 16:18:15 -070024obj-y += cmd_mtrr.o
Simon Glass55447572016-01-17 16:11:14 -070025obj-y += northbridge-uclass.o
Bin Mengda3fe242015-10-22 19:13:30 -070026obj-$(CONFIG_I8259_PIC) += i8259.o
27obj-$(CONFIG_I8254_TIMER) += i8254.o
Simon Glass7ac99be2016-03-11 22:07:13 -070028obj-y += pinctrl_ich6.o
Bin Mengb5b6b012015-04-24 18:10:05 +080029obj-y += pirq_routing.o
Masahiro Yamada3954b732013-10-21 11:53:34 +090030obj-y += relocate.o
31obj-y += physmem.o
Simon Glass65dd74a2014-11-12 22:42:28 -070032obj-$(CONFIG_X86_RAMTEST) += ramtest.o
Simon Glass65e4c0b2016-09-25 15:27:35 -060033obj-y += sections.o
Simon Glass6388e352015-04-28 20:25:10 -060034obj-y += sfi.o
Masahiro Yamada3954b732013-10-21 11:53:34 +090035obj-y += string.o
Miao Yan34865a62016-05-22 19:37:10 -070036ifndef CONFIG_QEMU
Saket Sinha867bcb62015-08-22 12:20:55 +053037obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
Miao Yanfa287b12016-01-20 01:57:06 -080038endif
Bin Meng5e2400e2015-04-24 18:10:04 +080039obj-y += tables.o
Masahiro Yamada3954b732013-10-21 11:53:34 +090040obj-$(CONFIG_CMD_ZBOOT) += zimage.o
Simon Glass1021af42015-01-27 22:13:36 -070041obj-$(CONFIG_HAVE_FSP) += fsp/
Simon Glass4bbc0242017-01-16 07:03:56 -070042obj-$(CONFIG_SPL_BUILD) += spl.o
wdenk2262cfe2002-11-18 00:14:45 +000043
Simon Glassb997abd2015-08-04 12:33:53 -060044extra-$(CONFIG_USE_PRIVATE_LIBGCC) += lib.a
wdenk2262cfe2002-11-18 00:14:45 +000045
Masahiro Yamadadd43fa22014-10-24 01:30:41 +090046NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
Masahiro Yamadab6e53eb2014-03-11 11:05:13 +090047OBJCOPYFLAGS := --prefix-symbols=__normal_
Masahiro Yamadadd43fa22014-10-24 01:30:41 +090048$(obj)/lib.a: $(NORMAL_LIBGCC) FORCE
Masahiro Yamadab6e53eb2014-03-11 11:05:13 +090049 $(call if_changed,objcopy)
Simon Glass2dcd4e92016-11-07 08:47:14 -070050
Simon Glasse1b610b2017-01-16 07:04:12 -070051ifeq ($(CONFIG_$(SPL_)X86_64),)
Simon Glass2dcd4e92016-11-07 08:47:14 -070052obj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
Simon Glasse1b610b2017-01-16 07:04:12 -070053endif
Simon Glass2dcd4e92016-11-07 08:47:14 -070054
55ifneq ($(CONFIG_EFI_STUB),)
56
57CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
58CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
59
60# When building for 64-bit we must remove the i386-specific flags
61CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
62CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar
63
64AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
65AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar
66
67extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
68extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
Simon Glass5bd828b2016-11-07 08:47:15 -070069
70endif
71
Alexander Graf95b62b22016-11-17 22:40:10 +010072ifneq ($(CONFIG_EFI_STUB)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
Simon Glasse1b610b2017-01-16 07:04:12 -070073ifeq ($(CONFIG_$(SPL_)X86_64),)
Simon Glass5bd828b2016-11-07 08:47:15 -070074extra-y += $(EFI_CRT0) $(EFI_RELOC)
Simon Glass2dcd4e92016-11-07 08:47:14 -070075endif
Simon Glasse1b610b2017-01-16 07:04:12 -070076endif