fd344cea29b03655672b27ded322a3709e8d883b
[platform/kernel/u-boot.git] / lib / efi_loader / Makefile
1 # SPDX-License-Identifier: GPL-2.0+
2 #
3 # (C) Copyright 2016 Alexander Graf
4 #
5
6 # This file only gets included with CONFIG_EFI_LOADER set, so all
7 # object inclusion implicitly depends on it
8
9 asflags-y += -DHOST_ARCH="$(HOST_ARCH)" -I.
10 ccflags-y += -DHOST_ARCH="$(HOST_ARCH)"
11
12 CFLAGS_efi_boottime.o += \
13   -DFW_VERSION="0x$(VERSION)" \
14   -DFW_PATCHLEVEL="0x$(PATCHLEVEL)"
15 CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding
16 CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI)
17
18 ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
19 always += helloworld.efi
20 targets += helloworld.o
21 endif
22
23 obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o
24 obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += efi_bootmgr.o
25 obj-y += efi_boottime.o
26 obj-y += efi_helper.o
27 obj-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += efi_capsule.o
28 obj-$(CONFIG_EFI_CAPSULE_FIRMWARE) += efi_firmware.o
29 obj-y += efi_console.o
30 obj-y += efi_device_path.o
31 obj-$(CONFIG_EFI_DEVICE_PATH_TO_TEXT) += efi_device_path_to_text.o
32 obj-$(CONFIG_EFI_DEVICE_PATH_UTIL) += efi_device_path_utilities.o
33 ifeq ($(CONFIG_GENERATE_ACPI_TABLE),)
34 obj-y += efi_dt_fixup.o
35 endif
36 obj-y += efi_file.o
37 obj-$(CONFIG_EFI_LOADER_HII) += efi_hii.o
38 obj-y += efi_image_loader.o
39 obj-y += efi_load_options.o
40 obj-y += efi_memory.o
41 obj-y += efi_root_node.o
42 obj-y += efi_runtime.o
43 obj-y += efi_setup.o
44 obj-y += efi_string.o
45 obj-$(CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2) += efi_unicode_collation.o
46 obj-y += efi_var_common.o
47 obj-y += efi_var_mem.o
48 obj-y += efi_var_file.o
49 ifeq ($(CONFIG_EFI_MM_COMM_TEE),y)
50 obj-y += efi_variable_tee.o
51 else
52 obj-y += efi_variable.o
53 obj-$(CONFIG_EFI_VARIABLES_PRESEED) += efi_var_seed.o
54 endif
55 obj-y += efi_watchdog.o
56 obj-$(CONFIG_EFI_ESRT) += efi_esrt.o
57 obj-$(CONFIG_LCD) += efi_gop.o
58 obj-$(CONFIG_DM_VIDEO) += efi_gop.o
59 obj-$(CONFIG_PARTITIONS) += efi_disk.o
60 obj-$(CONFIG_NET) += efi_net.o
61 obj-$(CONFIG_GENERATE_ACPI_TABLE) += efi_acpi.o
62 obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += efi_smbios.o
63 obj-$(CONFIG_EFI_RNG_PROTOCOL) += efi_rng.o
64 obj-$(CONFIG_EFI_TCG2_PROTOCOL) += efi_tcg2.o
65 obj-$(CONFIG_EFI_LOAD_FILE2_INITRD) += efi_load_initrd.o
66 obj-$(CONFIG_EFI_SIGNATURE_SUPPORT) += efi_signature.o
67
68 EFI_VAR_SEED_FILE := $(subst $\",,$(CONFIG_EFI_VAR_SEED_FILE))
69 $(obj)/efi_var_seed.o: $(srctree)/$(EFI_VAR_SEED_FILE)