xref: /openbmc/u-boot/arch/x86/lib/Makefile (revision be059e88)
1#
2# (C) Copyright 2002-2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# SPDX-License-Identifier:	GPL-2.0+
6#
7
8obj-y += bios.o
9obj-y += bios_asm.o
10obj-y += bios_interrupts.o
11obj-$(CONFIG_CMD_BOOTM) += bootm.o
12obj-y	+= cmd_boot.o
13obj-$(CONFIG_SEABIOS) += coreboot_table.o
14obj-$(CONFIG_EFI) += efi/
15obj-y	+= e820.o
16obj-y	+= gcc.o
17obj-y	+= init_helpers.o
18obj-y	+= interrupts.o
19obj-y	+= lpc-uclass.o
20obj-y	+= mpspec.o
21obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
22obj-y += cmd_mtrr.o
23obj-y	+= northbridge-uclass.o
24obj-$(CONFIG_I8259_PIC) += i8259.o
25obj-$(CONFIG_I8254_TIMER) += i8254.o
26obj-y	+= pinctrl_ich6.o
27obj-y	+= pirq_routing.o
28obj-y	+= relocate.o
29obj-y += physmem.o
30obj-$(CONFIG_X86_RAMTEST) += ramtest.o
31obj-y	+= sections.o
32obj-y += sfi.o
33obj-y	+= string.o
34ifndef CONFIG_QEMU
35obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
36endif
37obj-y	+= tables.o
38obj-$(CONFIG_CMD_ZBOOT)	+= zimage.o
39obj-$(CONFIG_HAVE_FSP) += fsp/
40obj-$(CONFIG_SPL_BUILD) += spl.o
41
42extra-$(CONFIG_USE_PRIVATE_LIBGCC) += lib.a
43
44NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
45OBJCOPYFLAGS := --prefix-symbols=__normal_
46$(obj)/lib.a: $(NORMAL_LIBGCC) FORCE
47	$(call if_changed,objcopy)
48
49obj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
50
51ifneq ($(CONFIG_EFI_STUB),)
52
53CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
54CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
55
56# When building for 64-bit we must remove the i386-specific flags
57CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
58CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar
59
60AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
61AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar
62
63extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
64extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
65
66endif
67
68ifneq ($(CONFIG_EFI_STUB)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
69extra-y += $(EFI_CRT0) $(EFI_RELOC)
70endif
71