xref: /openbmc/u-boot/arch/x86/lib/Makefile (revision 63f7e3fca391a50a499fed828fe16325fdee45f3)
183d290c5STom Rini# SPDX-License-Identifier: GPL-2.0+
2fea25720SGraeme Russ#
3fea25720SGraeme Russ# (C) Copyright 2002-2006
4fea25720SGraeme Russ# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5fea25720SGraeme Russ
605cbd985SSimon Glassifndef CONFIG_X86_64
70ca2426bSSimon Glassobj-y += bios.o
80ca2426bSSimon Glassobj-y += bios_asm.o
90ca2426bSSimon Glassobj-y += bios_interrupts.o
10*6b59607fSHeinrich Schuchardtobj-y += string.o
1105cbd985SSimon Glassendif
12ca5114f9SSimon Glassifndef CONFIG_SPL_BUILD
133954b739SMasahiro Yamadaobj-$(CONFIG_CMD_BOOTM) += bootm.o
14ca5114f9SSimon Glassendif
153954b739SMasahiro Yamadaobj-y	+= cmd_boot.o
1654834491SBin Mengobj-$(CONFIG_SEABIOS) += coreboot_table.o
179f1fad1eSBin Mengobj-y	+= early_cmos.o
1859ec719dSBin Mengobj-y	+= e820.o
193954b739SMasahiro Yamadaobj-y	+= init_helpers.o
203954b739SMasahiro Yamadaobj-y	+= interrupts.o
21a274e9caSSimon Glassobj-y	+= lpc-uclass.o
227f5df8d4SBin Mengobj-y	+= mpspec.o
23f6220f1aSBin Mengobj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
245544757cSSimon Glassobj-y	+= northbridge-uclass.o
25da3fe247SBin Mengobj-$(CONFIG_I8259_PIC) += i8259.o
26da3fe247SBin Mengobj-$(CONFIG_I8254_TIMER) += i8254.o
27fcfc8a82SBin Mengobj-$(CONFIG_PINCTRL_ICH6) += pinctrl_ich6.o
28b5b6b019SBin Mengobj-y	+= pirq_routing.o
293954b739SMasahiro Yamadaobj-y	+= relocate.o
303954b739SMasahiro Yamadaobj-y += physmem.o
31ca0d29e4SAndy Shevchenkoobj-$(CONFIG_INTEL_MID) += pmu.o
3265dd74a6SSimon Glassobj-$(CONFIG_X86_RAMTEST) += ramtest.o
33bb416465SFelipe Balbiobj-$(CONFIG_INTEL_MID) += scu.o
3465e4c0b1SSimon Glassobj-y	+= sections.o
356388e357SSimon Glassobj-y += sfi.o
36a0609a8dSBin Mengobj-y	+= acpi.o
373a34cae0SBin Mengobj-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.o
3834865a65SMiao Yanifndef CONFIG_QEMU
39867bcb63SSaket Sinhaobj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
40fa287b15SMiao Yanendif
415e2400e8SBin Mengobj-y	+= tables.o
42ca5114f9SSimon Glassifndef CONFIG_SPL_BUILD
433954b739SMasahiro Yamadaobj-$(CONFIG_CMD_ZBOOT)	+= zimage.o
44ca5114f9SSimon Glassendif
451021af4dSSimon Glassobj-$(CONFIG_HAVE_FSP) += fsp/
464bbc0245SSimon Glassobj-$(CONFIG_SPL_BUILD) += spl.o
47fea25720SGraeme Russ
48aa7839b3SStefan Roeselib-$(CONFIG_USE_PRIVATE_LIBGCC) += div64.o
492dcd4e9eSSimon Glass
50e1b610b0SSimon Glassifeq ($(CONFIG_$(SPL_)X86_64),)
512dcd4e9eSSimon Glassobj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
52e1b610b0SSimon Glassendif
532dcd4e9eSSimon Glass
542dcd4e9eSSimon Glassifneq ($(CONFIG_EFI_STUB),)
552dcd4e9eSSimon Glass
562dcd4e9eSSimon GlassCFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
572dcd4e9eSSimon GlassCFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
582dcd4e9eSSimon Glass
592dcd4e9eSSimon Glass# When building for 64-bit we must remove the i386-specific flags
602dcd4e9eSSimon GlassCFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
6116dde894SBin MengCFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar -m64
622dcd4e9eSSimon Glass
632dcd4e9eSSimon GlassAFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
6416dde894SBin MengAFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar -m64
652dcd4e9eSSimon Glass
662dcd4e9eSSimon Glassextra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
672dcd4e9eSSimon Glassextra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
685bd828b5SSimon Glass
695bd828b5SSimon Glassendif
705bd828b5SSimon Glass
71f2560e2dSHeinrich Schuchardtifdef CONFIG_EFI_STUB
72f2560e2dSHeinrich Schuchardt
73e1b610b0SSimon Glassifeq ($(CONFIG_$(SPL_)X86_64),)
745bd828b5SSimon Glassextra-y += $(EFI_CRT0) $(EFI_RELOC)
752dcd4e9eSSimon Glassendif
76f2560e2dSHeinrich Schuchardt
77f2560e2dSHeinrich Schuchardtelse
78f2560e2dSHeinrich Schuchardt
79f2560e2dSHeinrich Schuchardtifndef CONFIG_SPL_BUILD
80f2560e2dSHeinrich Schuchardtifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
81f2560e2dSHeinrich Schuchardtextra-y += $(EFI_CRT0) $(EFI_RELOC)
82f2560e2dSHeinrich Schuchardtendif
83f2560e2dSHeinrich Schuchardtendif
84f2560e2dSHeinrich Schuchardt
85e1b610b0SSimon Glassendif
86