xref: /openbmc/u-boot/lib/efi_selftest/Makefile (revision ae86b6be)
1623b3a57SHeinrich Schuchardt:
2623b3a57SHeinrich Schuchardt# (C) Copyright 2017, Heinrich Schuchardt <xypron.glpk@gmx.de>
3623b3a57SHeinrich Schuchardt#
4623b3a57SHeinrich Schuchardt#  SPDX-License-Identifier:     GPL-2.0+
5623b3a57SHeinrich Schuchardt#
6623b3a57SHeinrich Schuchardt
7623b3a57SHeinrich Schuchardt# This file only gets included with CONFIG_EFI_LOADER set, so all
8623b3a57SHeinrich Schuchardt# object inclusion implicitly depends on it
9623b3a57SHeinrich Schuchardt
10*ae86b6beSHeinrich SchuchardtCFLAGS_efi_selftest_miniapp_exit.o := $(CFLAGS_EFI) -Os -ffreestanding
11*ae86b6beSHeinrich SchuchardtCFLAGS_REMOVE_efi_selftest_miniapp_exit.o := $(CFLAGS_NON_EFI) -Os
12*ae86b6beSHeinrich SchuchardtCFLAGS_efi_selftest_miniapp_return.o := $(CFLAGS_EFI) -Os -ffreestanding
13*ae86b6beSHeinrich SchuchardtCFLAGS_REMOVE_efi_selftest_miniapp_return.o := $(CFLAGS_NON_EFI) -Os
148218f7b5SHeinrich Schuchardt
15623b3a57SHeinrich Schuchardtobj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += \
16623b3a57SHeinrich Schuchardtefi_selftest.o \
17fb833509SHeinrich Schuchardtefi_selftest_controllers.o \
18bd126692SHeinrich Schuchardtefi_selftest_console.o \
19bf19064bSHeinrich Schuchardtefi_selftest_devicepath.o \
201835f6eaSHeinrich Schuchardtefi_selftest_events.o \
210923876dSHeinrich Schuchardtefi_selftest_exitbootservices.o \
2249d62cb0SHeinrich Schuchardtefi_selftest_gop.o \
23927ca890SHeinrich Schuchardtefi_selftest_manageprotocols.o \
245ca23ed5SHeinrich Schuchardtefi_selftest_snp.o \
257406f824SHeinrich Schuchardtefi_selftest_textoutput.o \
265ca23ed5SHeinrich Schuchardtefi_selftest_tpl.o \
2730a0045aSHeinrich Schuchardtefi_selftest_util.o \
2830a0045aSHeinrich Schuchardtefi_selftest_watchdog.o
298218f7b5SHeinrich Schuchardt
30f7686192SHeinrich Schuchardtifeq ($(CONFIG_BLK)$(CONFIG_PARTITIONS),yy)
31f7686192SHeinrich Schuchardtobj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += efi_selftest_block_device.o
32f7686192SHeinrich Schuchardtendif
338218f7b5SHeinrich Schuchardt
348218f7b5SHeinrich Schuchardt# TODO: As of v2018.01 the relocation code for the EFI application cannot
358218f7b5SHeinrich Schuchardt# be built on x86_64.
368218f7b5SHeinrich Schuchardtifeq ($(CONFIG_X86_64),)
378218f7b5SHeinrich Schuchardt
388218f7b5SHeinrich Schuchardtifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),)
398218f7b5SHeinrich Schuchardt
408218f7b5SHeinrich Schuchardtobj-y += \
418218f7b5SHeinrich Schuchardtefi_selftest_startimage_exit.o \
428218f7b5SHeinrich Schuchardtefi_selftest_startimage_return.o
438218f7b5SHeinrich Schuchardt
448218f7b5SHeinrich Schuchardttargets += \
458218f7b5SHeinrich Schuchardtefi_miniapp_file_image_exit.h \
468218f7b5SHeinrich Schuchardtefi_miniapp_file_image_return.h \
478218f7b5SHeinrich Schuchardtefi_selftest_miniapp_exit.efi \
488218f7b5SHeinrich Schuchardtefi_selftest_miniapp_return.efi
498218f7b5SHeinrich Schuchardt
508218f7b5SHeinrich Schuchardt$(obj)/efi_miniapp_file_image_exit.h: $(obj)/efi_selftest_miniapp_exit.efi
518218f7b5SHeinrich Schuchardt	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_exit.efi > \
528218f7b5SHeinrich Schuchardt	$(obj)/efi_miniapp_file_image_exit.h
538218f7b5SHeinrich Schuchardt
548218f7b5SHeinrich Schuchardt$(obj)/efi_miniapp_file_image_return.h: $(obj)/efi_selftest_miniapp_return.efi
558218f7b5SHeinrich Schuchardt	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_return.efi > \
568218f7b5SHeinrich Schuchardt	$(obj)/efi_miniapp_file_image_return.h
578218f7b5SHeinrich Schuchardt
588218f7b5SHeinrich Schuchardt$(obj)/efi_selftest_startimage_exit.o: $(obj)/efi_miniapp_file_image_exit.h
598218f7b5SHeinrich Schuchardt
608218f7b5SHeinrich Schuchardt$(obj)/efi_selftest_startimage_return.o: $(obj)/efi_miniapp_file_image_return.h
618218f7b5SHeinrich Schuchardt
628218f7b5SHeinrich Schuchardtendif
638218f7b5SHeinrich Schuchardt
648218f7b5SHeinrich Schuchardtendif
65