xref: /openbmc/u-boot/arch/x86/lib/Makefile (revision 7da7ff54)
1# SPDX-License-Identifier: GPL-2.0+
2#
3# (C) Copyright 2002-2006
4# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5
6ifndef CONFIG_X86_64
7obj-y += bios.o
8obj-y += bios_asm.o
9obj-y += bios_interrupts.o
10endif
11ifndef CONFIG_SPL_BUILD
12obj-$(CONFIG_CMD_BOOTM) += bootm.o
13endif
14obj-y	+= cmd_boot.o
15obj-$(CONFIG_SEABIOS) += coreboot_table.o
16obj-y	+= early_cmos.o
17obj-$(CONFIG_EFI) += efi/
18obj-y	+= e820.o
19obj-y	+= init_helpers.o
20obj-y	+= interrupts.o
21obj-y	+= lpc-uclass.o
22obj-y	+= mpspec.o
23obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
24obj-y	+= northbridge-uclass.o
25obj-$(CONFIG_I8259_PIC) += i8259.o
26obj-$(CONFIG_I8254_TIMER) += i8254.o
27obj-$(CONFIG_PINCTRL_ICH6) += pinctrl_ich6.o
28obj-y	+= pirq_routing.o
29obj-y	+= relocate.o
30obj-y += physmem.o
31obj-$(CONFIG_INTEL_MID) += pmu.o
32obj-$(CONFIG_X86_RAMTEST) += ramtest.o
33obj-$(CONFIG_INTEL_MID) += scu.o
34obj-y	+= sections.o
35obj-y += sfi.o
36obj-y	+= string.o
37obj-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.o
38ifndef CONFIG_QEMU
39obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
40endif
41obj-y	+= tables.o
42ifndef CONFIG_SPL_BUILD
43obj-$(CONFIG_CMD_ZBOOT)	+= zimage.o
44endif
45obj-$(CONFIG_HAVE_FSP) += fsp/
46obj-$(CONFIG_SPL_BUILD) += spl.o
47
48lib-$(CONFIG_USE_PRIVATE_LIBGCC) += div64.o
49
50ifeq ($(CONFIG_$(SPL_)X86_64),)
51obj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
52endif
53
54ifneq ($(CONFIG_EFI_STUB),)
55
56CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
57CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
58
59# When building for 64-bit we must remove the i386-specific flags
60CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
61CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar -m64
62
63AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
64AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar -m64
65
66extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
67extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
68
69endif
70
71ifdef CONFIG_EFI_STUB
72
73ifeq ($(CONFIG_$(SPL_)X86_64),)
74extra-y += $(EFI_CRT0) $(EFI_RELOC)
75endif
76
77else
78
79ifndef CONFIG_SPL_BUILD
80ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
81extra-y += $(EFI_CRT0) $(EFI_RELOC)
82endif
83endif
84
85endif
86