Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. ifndef CONFIG_X86_64
  8. obj-y += bios.o
  9. obj-y += bios_asm.o
  10. obj-y += bios_interrupts.o
  11. endif
  12. ifndef CONFIG_SPL_BUILD
  13. obj-$(CONFIG_CMD_BOOTM) += bootm.o
  14. endif
  15. obj-y += cmd_boot.o
  16. obj-$(CONFIG_SEABIOS) += coreboot_table.o
  17. obj-y += early_cmos.o
  18. obj-$(CONFIG_EFI) += efi/
  19. obj-y += e820.o
  20. obj-y += gcc.o
  21. obj-y += init_helpers.o
  22. obj-y += interrupts.o
  23. obj-y += lpc-uclass.o
  24. obj-y += mpspec.o
  25. obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o
  26. obj-y += cmd_mtrr.o
  27. obj-y += northbridge-uclass.o
  28. obj-$(CONFIG_I8259_PIC) += i8259.o
  29. obj-$(CONFIG_I8254_TIMER) += i8254.o
  30. obj-y += pinctrl_ich6.o
  31. obj-y += pirq_routing.o
  32. obj-y += relocate.o
  33. obj-y += physmem.o
  34. obj-$(CONFIG_INTEL_MID) += pmu.o
  35. obj-$(CONFIG_X86_RAMTEST) += ramtest.o
  36. obj-$(CONFIG_INTEL_MID) += scu.o
  37. obj-y += sections.o
  38. obj-y += sfi.o
  39. obj-y += string.o
  40. obj-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.o
  41. ifndef CONFIG_QEMU
  42. obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
  43. endif
  44. obj-y += tables.o
  45. ifndef CONFIG_SPL_BUILD
  46. obj-$(CONFIG_CMD_ZBOOT) += zimage.o
  47. endif
  48. obj-$(CONFIG_HAVE_FSP) += fsp/
  49. obj-$(CONFIG_SPL_BUILD) += spl.o
  50. extra-$(CONFIG_USE_PRIVATE_LIBGCC) += lib.a
  51. NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
  52. OBJCOPYFLAGS := --prefix-symbols=__normal_
  53. $(obj)/lib.a: $(NORMAL_LIBGCC) FORCE
  54. $(call if_changed,objcopy)
  55. ifeq ($(CONFIG_$(SPL_)X86_64),)
  56. obj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
  57. endif
  58. ifneq ($(CONFIG_EFI_STUB),)
  59. CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
  60. CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
  61. # When building for 64-bit we must remove the i386-specific flags
  62. CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
  63. CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar
  64. AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
  65. AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar
  66. extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
  67. extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
  68. endif
  69. ifneq ($(CONFIG_EFI_STUB)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
  70. ifeq ($(CONFIG_$(SPL_)X86_64),)
  71. extra-y += $(EFI_CRT0) $(EFI_RELOC)
  72. endif
  73. endif