xref: /openbmc/u-boot/arch/x86/lib/Makefile (revision 8e51c0f2)
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-y	+= e820.o
18obj-y	+= init_helpers.o
19obj-y	+= interrupts.o
20obj-y	+= lpc-uclass.o
21obj-y	+= mpspec.o
22obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
23obj-y	+= northbridge-uclass.o
24obj-$(CONFIG_I8259_PIC) += i8259.o
25obj-$(CONFIG_I8254_TIMER) += i8254.o
26obj-$(CONFIG_PINCTRL_ICH6) += pinctrl_ich6.o
27obj-y	+= pirq_routing.o
28obj-y	+= relocate.o
29obj-y += physmem.o
30obj-$(CONFIG_INTEL_MID) += pmu.o
31obj-$(CONFIG_X86_RAMTEST) += ramtest.o
32obj-$(CONFIG_INTEL_MID) += scu.o
33obj-y	+= sections.o
34obj-y += sfi.o
35obj-y	+= string.o
36obj-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.o
37ifndef CONFIG_QEMU
38obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
39endif
40obj-y	+= tables.o
41ifndef CONFIG_SPL_BUILD
42obj-$(CONFIG_CMD_ZBOOT)	+= zimage.o
43endif
44obj-$(CONFIG_HAVE_FSP) += fsp/
45obj-$(CONFIG_SPL_BUILD) += spl.o
46
47lib-$(CONFIG_USE_PRIVATE_LIBGCC) += div64.o
48
49ifeq ($(CONFIG_$(SPL_)X86_64),)
50obj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
51endif
52
53ifneq ($(CONFIG_EFI_STUB),)
54
55CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
56CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
57
58# When building for 64-bit we must remove the i386-specific flags
59CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
60CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar -m64
61
62AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
63AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar -m64
64
65extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
66extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
67
68endif
69
70ifdef CONFIG_EFI_STUB
71
72ifeq ($(CONFIG_$(SPL_)X86_64),)
73extra-y += $(EFI_CRT0) $(EFI_RELOC)
74endif
75
76else
77
78ifndef CONFIG_SPL_BUILD
79ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
80extra-y += $(EFI_CRT0) $(EFI_RELOC)
81endif
82endif
83
84endif
85