xref: /openbmc/u-boot/arch/x86/lib/Makefile (revision bb416465fde8393bcbf1f64847b5e3cb021d5c81)
1fea25720SGraeme Russ#
2fea25720SGraeme Russ# (C) Copyright 2002-2006
3fea25720SGraeme Russ# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4fea25720SGraeme Russ#
51a459660SWolfgang Denk# SPDX-License-Identifier:	GPL-2.0+
6fea25720SGraeme Russ#
7fea25720SGraeme Russ
805cbd985SSimon Glassifndef CONFIG_X86_64
90ca2426bSSimon Glassobj-y += bios.o
100ca2426bSSimon Glassobj-y += bios_asm.o
110ca2426bSSimon Glassobj-y += bios_interrupts.o
1205cbd985SSimon Glassendif
13ca5114f9SSimon Glassifndef CONFIG_SPL_BUILD
143954b739SMasahiro Yamadaobj-$(CONFIG_CMD_BOOTM) += bootm.o
15ca5114f9SSimon Glassendif
163954b739SMasahiro Yamadaobj-y	+= cmd_boot.o
1754834491SBin Mengobj-$(CONFIG_SEABIOS) += coreboot_table.o
188e366508SSimon Glassobj-$(CONFIG_EFI) += efi/
1959ec719dSBin Mengobj-y	+= e820.o
203954b739SMasahiro Yamadaobj-y	+= gcc.o
213954b739SMasahiro Yamadaobj-y	+= init_helpers.o
223954b739SMasahiro Yamadaobj-y	+= interrupts.o
23a274e9caSSimon Glassobj-y	+= lpc-uclass.o
247f5df8d4SBin Mengobj-y	+= mpspec.o
25f6220f1aSBin Mengobj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
26cb3b2e62SSimon Glassobj-y += cmd_mtrr.o
275544757cSSimon Glassobj-y	+= northbridge-uclass.o
28da3fe247SBin Mengobj-$(CONFIG_I8259_PIC) += i8259.o
29da3fe247SBin Mengobj-$(CONFIG_I8254_TIMER) += i8254.o
307ac99be6SSimon Glassobj-y	+= pinctrl_ich6.o
31b5b6b019SBin Mengobj-y	+= pirq_routing.o
323954b739SMasahiro Yamadaobj-y	+= relocate.o
333954b739SMasahiro Yamadaobj-y += physmem.o
3465dd74a6SSimon Glassobj-$(CONFIG_X86_RAMTEST) += ramtest.o
35*bb416465SFelipe Balbiobj-$(CONFIG_INTEL_MID) += scu.o
3665e4c0b1SSimon Glassobj-y	+= sections.o
376388e357SSimon Glassobj-y += sfi.o
383954b739SMasahiro Yamadaobj-y	+= string.o
3934865a65SMiao Yanifndef CONFIG_QEMU
40867bcb63SSaket Sinhaobj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
41fa287b15SMiao Yanendif
425e2400e8SBin Mengobj-y	+= tables.o
43ca5114f9SSimon Glassifndef CONFIG_SPL_BUILD
443954b739SMasahiro Yamadaobj-$(CONFIG_CMD_ZBOOT)	+= zimage.o
45ca5114f9SSimon Glassendif
461021af4dSSimon Glassobj-$(CONFIG_HAVE_FSP) += fsp/
474bbc0245SSimon Glassobj-$(CONFIG_SPL_BUILD) += spl.o
48fea25720SGraeme Russ
49b997abd3SSimon Glassextra-$(CONFIG_USE_PRIVATE_LIBGCC) += lib.a
50fea25720SGraeme Russ
51dd43fa22SMasahiro YamadaNORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
52b6e53eb3SMasahiro YamadaOBJCOPYFLAGS := --prefix-symbols=__normal_
53dd43fa22SMasahiro Yamada$(obj)/lib.a: $(NORMAL_LIBGCC) FORCE
54b6e53eb3SMasahiro Yamada	$(call if_changed,objcopy)
552dcd4e9eSSimon Glass
56e1b610b0SSimon Glassifeq ($(CONFIG_$(SPL_)X86_64),)
572dcd4e9eSSimon Glassobj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
58e1b610b0SSimon Glassendif
592dcd4e9eSSimon Glass
602dcd4e9eSSimon Glassifneq ($(CONFIG_EFI_STUB),)
612dcd4e9eSSimon Glass
622dcd4e9eSSimon GlassCFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
632dcd4e9eSSimon GlassCFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
642dcd4e9eSSimon Glass
652dcd4e9eSSimon Glass# When building for 64-bit we must remove the i386-specific flags
662dcd4e9eSSimon GlassCFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
672dcd4e9eSSimon GlassCFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar
682dcd4e9eSSimon Glass
692dcd4e9eSSimon GlassAFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
702dcd4e9eSSimon GlassAFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar
712dcd4e9eSSimon Glass
722dcd4e9eSSimon Glassextra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
732dcd4e9eSSimon Glassextra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
745bd828b5SSimon Glass
755bd828b5SSimon Glassendif
765bd828b5SSimon Glass
7795b62b2eSAlexander Grafifneq ($(CONFIG_EFI_STUB)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
78e1b610b0SSimon Glassifeq ($(CONFIG_$(SPL_)X86_64),)
795bd828b5SSimon Glassextra-y += $(EFI_CRT0) $(EFI_RELOC)
802dcd4e9eSSimon Glassendif
81e1b610b0SSimon Glassendif
82