xref: /openbmc/u-boot/lib/efi_selftest/Makefile (revision efe79a7c)
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
9ae86b6beSHeinrich SchuchardtCFLAGS_REMOVE_efi_selftest_miniapp_exit.o := $(CFLAGS_NON_EFI) -Os
10ae86b6beSHeinrich SchuchardtCFLAGS_efi_selftest_miniapp_return.o := $(CFLAGS_EFI) -Os -ffreestanding
11ae86b6beSHeinrich SchuchardtCFLAGS_REMOVE_efi_selftest_miniapp_return.o := $(CFLAGS_NON_EFI) -Os
128218f7b5SHeinrich Schuchardt
13623b3a57SHeinrich Schuchardtobj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += \
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 \
240923876dSHeinrich Schuchardtefi_selftest_exitbootservices.o \
2506c3d5b9SHeinrich Schuchardtefi_selftest_fdt.o \
2649d62cb0SHeinrich Schuchardtefi_selftest_gop.o \
27*efe79a7cSHeinrich Schuchardtefi_selftest_loaded_image.o \
28927ca890SHeinrich Schuchardtefi_selftest_manageprotocols.o \
298c588a58SHeinrich Schuchardtefi_selftest_rtc.o \
305ca23ed5SHeinrich Schuchardtefi_selftest_snp.o \
310aa2da78SHeinrich Schuchardtefi_selftest_textinput.o \
327406f824SHeinrich Schuchardtefi_selftest_textoutput.o \
335ca23ed5SHeinrich Schuchardtefi_selftest_tpl.o \
3430a0045aSHeinrich Schuchardtefi_selftest_util.o \
35d799c67aSHeinrich Schuchardtefi_selftest_variables.o \
3630a0045aSHeinrich Schuchardtefi_selftest_watchdog.o
378218f7b5SHeinrich Schuchardt
3885b46921SHeinrich Schuchardtifeq ($(CONFIG_CMD_BOOTEFI_SELFTEST),y)
3985b46921SHeinrich Schuchardtobj-$(CONFIG_CPU_V7) += efi_selftest_unaligned.o
4085b46921SHeinrich Schuchardtendif
4185b46921SHeinrich Schuchardt
42f7686192SHeinrich Schuchardtifeq ($(CONFIG_BLK)$(CONFIG_PARTITIONS),yy)
43f7686192SHeinrich Schuchardtobj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += efi_selftest_block_device.o
44f7686192SHeinrich Schuchardtendif
458218f7b5SHeinrich Schuchardt
468218f7b5SHeinrich Schuchardt# TODO: As of v2018.01 the relocation code for the EFI application cannot
478218f7b5SHeinrich Schuchardt# be built on x86_64.
48c034bfabSAlexander Grafifeq ($(CONFIG_X86_64)$(CONFIG_SANDBOX),)
498218f7b5SHeinrich Schuchardt
508218f7b5SHeinrich Schuchardtifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),)
518218f7b5SHeinrich Schuchardt
528218f7b5SHeinrich Schuchardtobj-y += \
538218f7b5SHeinrich Schuchardtefi_selftest_startimage_exit.o \
548218f7b5SHeinrich Schuchardtefi_selftest_startimage_return.o
558218f7b5SHeinrich Schuchardt
568218f7b5SHeinrich Schuchardttargets += \
578218f7b5SHeinrich Schuchardtefi_miniapp_file_image_exit.h \
588218f7b5SHeinrich Schuchardtefi_miniapp_file_image_return.h \
598218f7b5SHeinrich Schuchardtefi_selftest_miniapp_exit.efi \
608218f7b5SHeinrich Schuchardtefi_selftest_miniapp_return.efi
618218f7b5SHeinrich Schuchardt
628218f7b5SHeinrich Schuchardt$(obj)/efi_miniapp_file_image_exit.h: $(obj)/efi_selftest_miniapp_exit.efi
638218f7b5SHeinrich Schuchardt	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_exit.efi > \
648218f7b5SHeinrich Schuchardt	$(obj)/efi_miniapp_file_image_exit.h
658218f7b5SHeinrich Schuchardt
668218f7b5SHeinrich Schuchardt$(obj)/efi_miniapp_file_image_return.h: $(obj)/efi_selftest_miniapp_return.efi
678218f7b5SHeinrich Schuchardt	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_return.efi > \
688218f7b5SHeinrich Schuchardt	$(obj)/efi_miniapp_file_image_return.h
698218f7b5SHeinrich Schuchardt
708218f7b5SHeinrich Schuchardt$(obj)/efi_selftest_startimage_exit.o: $(obj)/efi_miniapp_file_image_exit.h
718218f7b5SHeinrich Schuchardt
728218f7b5SHeinrich Schuchardt$(obj)/efi_selftest_startimage_return.o: $(obj)/efi_miniapp_file_image_return.h
738218f7b5SHeinrich Schuchardt
748218f7b5SHeinrich Schuchardtendif
758218f7b5SHeinrich Schuchardt
768218f7b5SHeinrich Schuchardtendif
77