xref: /openbmc/u-boot/lib/efi_selftest/Makefile (revision d787cadd)
1623b3a57SHeinrich Schuchardt# SPDX-License-Identifier: GPL-2.0+
2623b3a57SHeinrich Schuchardt#
3f739fcd8STom Rini# (C) Copyright 2017, Heinrich Schuchardt <xypron.glpk@gmx.de>
4623b3a57SHeinrich Schuchardt
5623b3a57SHeinrich Schuchardt# This file only gets included with CONFIG_EFI_LOADER set, so all
6623b3a57SHeinrich Schuchardt# object inclusion implicitly depends on it
7623b3a57SHeinrich Schuchardt
8ae86b6beSHeinrich SchuchardtCFLAGS_efi_selftest_miniapp_exit.o := $(CFLAGS_EFI) -Os -ffreestanding
90e3dc01eSHeinrich SchuchardtCFLAGS_REMOVE_efi_selftest_miniapp_exit.o := $(CFLAGS_NON_EFI)
10ae86b6beSHeinrich SchuchardtCFLAGS_efi_selftest_miniapp_return.o := $(CFLAGS_EFI) -Os -ffreestanding
110e3dc01eSHeinrich SchuchardtCFLAGS_REMOVE_efi_selftest_miniapp_return.o := $(CFLAGS_NON_EFI)
128218f7b5SHeinrich Schuchardt
13f6e7b653SHeinrich Schuchardtobj-y += \
14623b3a57SHeinrich Schuchardtefi_selftest.o \
15b944e471SHeinrich Schuchardtefi_selftest_bitblt.o \
169b30232bSHeinrich Schuchardtefi_selftest_config_table.o \
17fb833509SHeinrich Schuchardtefi_selftest_controllers.o \
18bd126692SHeinrich Schuchardtefi_selftest_console.o \
1962045b0eSHeinrich Schuchardtefi_selftest_crc32.o \
20bf19064bSHeinrich Schuchardtefi_selftest_devicepath.o \
21e83222bfSHeinrich Schuchardtefi_selftest_devicepath_util.o \
221835f6eaSHeinrich Schuchardtefi_selftest_events.o \
236fc901c5SHeinrich Schuchardtefi_selftest_event_groups.o \
241c32bb10SHeinrich Schuchardtefi_selftest_exception.o \
250923876dSHeinrich Schuchardtefi_selftest_exitbootservices.o \
2606c3d5b9SHeinrich Schuchardtefi_selftest_fdt.o \
2749d62cb0SHeinrich Schuchardtefi_selftest_gop.o \
28efe79a7cSHeinrich Schuchardtefi_selftest_loaded_image.o \
29927ca890SHeinrich Schuchardtefi_selftest_manageprotocols.o \
3034841303SHeinrich Schuchardtefi_selftest_memory.o \
318c588a58SHeinrich Schuchardtefi_selftest_rtc.o \
325ca23ed5SHeinrich Schuchardtefi_selftest_snp.o \
330aa2da78SHeinrich Schuchardtefi_selftest_textinput.o \
343394f200SHeinrich Schuchardtefi_selftest_textinputex.o \
357406f824SHeinrich Schuchardtefi_selftest_textoutput.o \
365ca23ed5SHeinrich Schuchardtefi_selftest_tpl.o \
371d719e77SHeinrich Schuchardtefi_selftest_unicode_collation.o \
3830a0045aSHeinrich Schuchardtefi_selftest_util.o \
39d799c67aSHeinrich Schuchardtefi_selftest_variables.o \
4030a0045aSHeinrich Schuchardtefi_selftest_watchdog.o
418218f7b5SHeinrich Schuchardt
4285b46921SHeinrich Schuchardtobj-$(CONFIG_CPU_V7) += efi_selftest_unaligned.o
435fbb2895SAlexander Grafobj-$(CONFIG_EFI_LOADER_HII) += efi_selftest_hii.o
4485b46921SHeinrich Schuchardt
45f7686192SHeinrich Schuchardtifeq ($(CONFIG_BLK)$(CONFIG_PARTITIONS),yy)
46f6e7b653SHeinrich Schuchardtobj-y += efi_selftest_block_device.o
47f7686192SHeinrich Schuchardtendif
488218f7b5SHeinrich Schuchardt
49e4fd6956SHeinrich Schuchardt# TODO: As of v2019.01 the relocation code for the EFI application cannot
50e4fd6956SHeinrich Schuchardt# be built on ARMv7-M, Sandbox, and x86_64.
51e4fd6956SHeinrich Schuchardtifeq ($(CONFIG_SANDBOX)$(CONFIG_CPU_V7M)$(CONFIG_X86_64),)
528218f7b5SHeinrich Schuchardt
538218f7b5SHeinrich Schuchardtobj-y += \
54*d787caddSHeinrich Schuchardtefi_selftest_loadimage.o \
558218f7b5SHeinrich Schuchardtefi_selftest_startimage_exit.o \
568218f7b5SHeinrich Schuchardtefi_selftest_startimage_return.o
578218f7b5SHeinrich Schuchardt
588218f7b5SHeinrich Schuchardttargets += \
598218f7b5SHeinrich Schuchardtefi_miniapp_file_image_exit.h \
608218f7b5SHeinrich Schuchardtefi_miniapp_file_image_return.h \
618218f7b5SHeinrich Schuchardtefi_selftest_miniapp_exit.efi \
628218f7b5SHeinrich Schuchardtefi_selftest_miniapp_return.efi
638218f7b5SHeinrich Schuchardt
648218f7b5SHeinrich Schuchardt$(obj)/efi_miniapp_file_image_exit.h: $(obj)/efi_selftest_miniapp_exit.efi
658218f7b5SHeinrich Schuchardt	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_exit.efi > \
668218f7b5SHeinrich Schuchardt	$(obj)/efi_miniapp_file_image_exit.h
678218f7b5SHeinrich Schuchardt
688218f7b5SHeinrich Schuchardt$(obj)/efi_miniapp_file_image_return.h: $(obj)/efi_selftest_miniapp_return.efi
698218f7b5SHeinrich Schuchardt	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_return.efi > \
708218f7b5SHeinrich Schuchardt	$(obj)/efi_miniapp_file_image_return.h
718218f7b5SHeinrich Schuchardt
72*d787caddSHeinrich Schuchardt$(obj)/efi_selftest_loadimage.o: $(obj)/efi_miniapp_file_image_exit.h
73*d787caddSHeinrich Schuchardt
748218f7b5SHeinrich Schuchardt$(obj)/efi_selftest_startimage_exit.o: $(obj)/efi_miniapp_file_image_exit.h
758218f7b5SHeinrich Schuchardt
768218f7b5SHeinrich Schuchardt$(obj)/efi_selftest_startimage_return.o: $(obj)/efi_miniapp_file_image_return.h
778218f7b5SHeinrich Schuchardt
788218f7b5SHeinrich Schuchardtendif
79