xref: /openbmc/u-boot/lib/efi_selftest/Makefile (revision 8218f7b5)
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*8218f7b5SHeinrich SchuchardtCFLAGS_efi_selftest_miniapp.o := $(CFLAGS_EFI) -Os -ffreestanding
11*8218f7b5SHeinrich SchuchardtCFLAGS_REMOVE_efi_selftest_miniapp.o := $(CFLAGS_NON_EFI) -Os
12*8218f7b5SHeinrich Schuchardt
13623b3a57SHeinrich Schuchardtobj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += \
14623b3a57SHeinrich Schuchardtefi_selftest.o \
15fb833509SHeinrich Schuchardtefi_selftest_controllers.o \
16bd126692SHeinrich Schuchardtefi_selftest_console.o \
17bf19064bSHeinrich Schuchardtefi_selftest_devicepath.o \
181835f6eaSHeinrich Schuchardtefi_selftest_events.o \
190923876dSHeinrich Schuchardtefi_selftest_exitbootservices.o \
2049d62cb0SHeinrich Schuchardtefi_selftest_gop.o \
21927ca890SHeinrich Schuchardtefi_selftest_manageprotocols.o \
225ca23ed5SHeinrich Schuchardtefi_selftest_snp.o \
237406f824SHeinrich Schuchardtefi_selftest_textoutput.o \
245ca23ed5SHeinrich Schuchardtefi_selftest_tpl.o \
2530a0045aSHeinrich Schuchardtefi_selftest_util.o \
2630a0045aSHeinrich Schuchardtefi_selftest_watchdog.o
27*8218f7b5SHeinrich Schuchardt
28*8218f7b5SHeinrich Schuchardt
29*8218f7b5SHeinrich Schuchardt# TODO: As of v2018.01 the relocation code for the EFI application cannot
30*8218f7b5SHeinrich Schuchardt# be built on x86_64.
31*8218f7b5SHeinrich Schuchardtifeq ($(CONFIG_X86_64),)
32*8218f7b5SHeinrich Schuchardt
33*8218f7b5SHeinrich Schuchardtifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),)
34*8218f7b5SHeinrich Schuchardt
35*8218f7b5SHeinrich Schuchardtobj-y += \
36*8218f7b5SHeinrich Schuchardtefi_selftest_startimage_exit.o \
37*8218f7b5SHeinrich Schuchardtefi_selftest_startimage_return.o
38*8218f7b5SHeinrich Schuchardt
39*8218f7b5SHeinrich Schuchardttargets += \
40*8218f7b5SHeinrich Schuchardtefi_miniapp_file_image_exit.h \
41*8218f7b5SHeinrich Schuchardtefi_miniapp_file_image_return.h \
42*8218f7b5SHeinrich Schuchardtefi_selftest_miniapp_exit.efi \
43*8218f7b5SHeinrich Schuchardtefi_selftest_miniapp_return.efi
44*8218f7b5SHeinrich Schuchardt
45*8218f7b5SHeinrich Schuchardt$(obj)/efi_miniapp_file_image_exit.h: $(obj)/efi_selftest_miniapp_exit.efi
46*8218f7b5SHeinrich Schuchardt	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_exit.efi > \
47*8218f7b5SHeinrich Schuchardt	$(obj)/efi_miniapp_file_image_exit.h
48*8218f7b5SHeinrich Schuchardt
49*8218f7b5SHeinrich Schuchardt$(obj)/efi_miniapp_file_image_return.h: $(obj)/efi_selftest_miniapp_return.efi
50*8218f7b5SHeinrich Schuchardt	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_return.efi > \
51*8218f7b5SHeinrich Schuchardt	$(obj)/efi_miniapp_file_image_return.h
52*8218f7b5SHeinrich Schuchardt
53*8218f7b5SHeinrich Schuchardt$(obj)/efi_selftest_startimage_exit.o: $(obj)/efi_miniapp_file_image_exit.h
54*8218f7b5SHeinrich Schuchardt
55*8218f7b5SHeinrich Schuchardt$(obj)/efi_selftest_startimage_return.o: $(obj)/efi_miniapp_file_image_return.h
56*8218f7b5SHeinrich Schuchardt
57*8218f7b5SHeinrich Schuchardtendif
58*8218f7b5SHeinrich Schuchardt
59*8218f7b5SHeinrich Schuchardtendif
60