Simon Glass | 9e72e64 | 2015-08-04 12:33:53 -0600 | [diff] [blame] | 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 | |
Simon Glass | d2269f2 | 2015-08-04 12:34:01 -0600 | [diff] [blame] | 8 | obj-$(CONFIG_EFI_STUB) += car.o |
| 9 | obj-$(CONFIG_EFI_STUB) += efi.o |
| 10 | |
Simon Glass | 9e72e64 | 2015-08-04 12:33:53 -0600 | [diff] [blame] | 11 | obj-$(CONFIG_EFI_APP) += crt0-efi-ia32.o reloc_ia32.o |
| 12 | |
| 13 | ifneq ($(CONFIG_EFI_STUB),) |
| 14 | |
| 15 | CFLAGS_REMOVE_reloc_ia32.o += -mregparm=3 |
| 16 | CFLAGS_reloc_ia32.o += -fpic -fshort-wchar |
| 17 | |
| 18 | # When building for 64-bit we must remove the i386-specific flags |
| 19 | CFLAGS_REMOVE_reloc_x86_64.o += -mregparm=3 -march=i386 -m32 |
| 20 | CFLAGS_reloc_x86_64.o += -fpic -fshort-wchar |
| 21 | |
| 22 | AFLAGS_REMOVE_crt0-efi-x86_64.o += -mregparm=3 -march=i386 -m32 |
| 23 | AFLAGS_crt0-efi-x86_64.o += -fpic -fshort-wchar |
| 24 | |
| 25 | extra-$(CONFIG_EFI_STUB_32BIT) += crt0-efi-ia32.o reloc_ia32.o |
| 26 | extra-$(CONFIG_EFI_STUB_64BIT) += crt0-efi-x86_64.o reloc_x86_64.o |
| 27 | endif |