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