1# SPDX-License-Identifier: GPL-2.0+ 2# 3# (C) Copyright 2017, Heinrich Schuchardt <xypron.glpk@gmx.de> 4 5# This file only gets included with CONFIG_EFI_LOADER set, so all 6# object inclusion implicitly depends on it 7 8asflags-y += -DHOST_ARCH="$(HOST_ARCH)" 9ccflags-y += -DHOST_ARCH="$(HOST_ARCH)" 10 11CFLAGS_dtbdump.o := $(CFLAGS_EFI) -Os -ffreestanding 12CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI) 13CFLAGS_efi_selftest_miniapp_exception.o := $(CFLAGS_EFI) -Os -ffreestanding 14CFLAGS_REMOVE_efi_selftest_miniapp_exception.o := $(CFLAGS_NON_EFI) 15CFLAGS_efi_selftest_miniapp_exit.o := $(CFLAGS_EFI) -Os -ffreestanding 16CFLAGS_REMOVE_efi_selftest_miniapp_exit.o := $(CFLAGS_NON_EFI) 17CFLAGS_efi_selftest_miniapp_return.o := $(CFLAGS_EFI) -Os -ffreestanding 18CFLAGS_REMOVE_efi_selftest_miniapp_return.o := $(CFLAGS_NON_EFI) 19CFLAGS_initrddump_exit.o := $(CFLAGS_EFI) -Os -ffreestanding 20CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI) 21 22obj-y += \ 23efi_selftest.o \ 24efi_selftest_bitblt.o \ 25efi_selftest_config_table.o \ 26efi_selftest_controllers.o \ 27efi_selftest_console.o \ 28efi_selftest_crc32.o \ 29efi_selftest_devicepath_util.o \ 30efi_selftest_events.o \ 31efi_selftest_event_groups.o \ 32efi_selftest_exception.o \ 33efi_selftest_exitbootservices.o \ 34efi_selftest_gop.o \ 35efi_selftest_load_file.o \ 36efi_selftest_loaded_image.o \ 37efi_selftest_loadimage.o \ 38efi_selftest_manageprotocols.o \ 39efi_selftest_mem.o \ 40efi_selftest_memory.o \ 41efi_selftest_open_protocol.o \ 42efi_selftest_register_notify.o \ 43efi_selftest_reset.o \ 44efi_selftest_set_virtual_address_map.o \ 45efi_selftest_startimage_exit.o \ 46efi_selftest_startimage_return.o \ 47efi_selftest_textinput.o \ 48efi_selftest_textinputex.o \ 49efi_selftest_textoutput.o \ 50efi_selftest_tpl.o \ 51efi_selftest_util.o \ 52efi_selftest_variables.o \ 53efi_selftest_variables_runtime.o \ 54efi_selftest_watchdog.o 55 56obj-$(CONFIG_NET) += efi_selftest_snp.o 57 58obj-$(CONFIG_EFI_DEVICE_PATH_TO_TEXT) += efi_selftest_devicepath.o 59obj-$(CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2) += \ 60efi_selftest_unicode_collation.o 61 62obj-$(CONFIG_CPU_V7) += efi_selftest_unaligned.o 63obj-$(CONFIG_EFI_LOADER_HII) += efi_selftest_hii.o 64obj-$(CONFIG_EFI_RNG_PROTOCOL) += efi_selftest_rng.o 65obj-$(CONFIG_EFI_GET_TIME) += efi_selftest_rtc.o 66obj-$(CONFIG_EFI_TCG2_PROTOCOL) += efi_selftest_tcg2.o 67 68ifeq ($(CONFIG_GENERATE_ACPI_TABLE),) 69obj-y += efi_selftest_fdt.o 70endif 71 72ifeq ($(CONFIG_BLK)$(CONFIG_DOS_PARTITION),yy) 73obj-y += efi_selftest_block_device.o 74endif 75 76obj-$(CONFIG_EFI_ESRT) += efi_selftest_esrt.o 77 78targets += \ 79efi_miniapp_file_image_exception.h \ 80efi_miniapp_file_image_exit.h \ 81efi_miniapp_file_image_return.h \ 82efi_selftest_miniapp_exception.efi \ 83efi_selftest_miniapp_exit.efi \ 84efi_selftest_miniapp_return.efi 85 86ifeq ($(CONFIG_GENERATE_ACPI_TABLE),) 87always += dtbdump.efi 88endif 89 90ifdef CONFIG_EFI_LOAD_FILE2_INITRD 91always += initrddump.efi 92endif 93 94$(obj)/efi_miniapp_file_image_exception.h: $(obj)/efi_selftest_miniapp_exception.efi 95 $(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_exception.efi > \ 96 $(obj)/efi_miniapp_file_image_exception.h 97 98$(obj)/efi_miniapp_file_image_exit.h: $(obj)/efi_selftest_miniapp_exit.efi 99 $(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_exit.efi > \ 100 $(obj)/efi_miniapp_file_image_exit.h 101 102$(obj)/efi_miniapp_file_image_return.h: $(obj)/efi_selftest_miniapp_return.efi 103 $(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_return.efi > \ 104 $(obj)/efi_miniapp_file_image_return.h 105 106$(obj)/efi_selftest_exception.o: $(obj)/efi_miniapp_file_image_exception.h 107 108$(obj)/efi_selftest_load_file.o: $(obj)/efi_miniapp_file_image_exit.h 109 110$(obj)/efi_selftest_loadimage.o: $(obj)/efi_miniapp_file_image_exit.h 111 112$(obj)/efi_selftest_startimage_exit.o: $(obj)/efi_miniapp_file_image_exit.h 113 114$(obj)/efi_selftest_startimage_return.o: $(obj)/efi_miniapp_file_image_return.h 115