xref: /openbmc/u-boot/lib/efi_selftest/Makefile (revision 77c42611)
1:
2# (C) Copyright 2017, Heinrich Schuchardt <xypron.glpk@gmx.de>
3#
4#  SPDX-License-Identifier:     GPL-2.0+
5#
6
7# This file only gets included with CONFIG_EFI_LOADER set, so all
8# object inclusion implicitly depends on it
9
10CFLAGS_efi_selftest_miniapp.o := $(CFLAGS_EFI) -Os -ffreestanding
11CFLAGS_REMOVE_efi_selftest_miniapp.o := $(CFLAGS_NON_EFI) -Os
12
13obj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += \
14efi_selftest.o \
15efi_selftest_controllers.o \
16efi_selftest_console.o \
17efi_selftest_devicepath.o \
18efi_selftest_events.o \
19efi_selftest_exitbootservices.o \
20efi_selftest_gop.o \
21efi_selftest_manageprotocols.o \
22efi_selftest_snp.o \
23efi_selftest_textoutput.o \
24efi_selftest_tpl.o \
25efi_selftest_util.o \
26efi_selftest_watchdog.o
27
28ifeq ($(CONFIG_BLK)$(CONFIG_PARTITIONS),yy)
29obj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += efi_selftest_block_device.o
30endif
31
32# TODO: As of v2018.01 the relocation code for the EFI application cannot
33# be built on x86_64.
34ifeq ($(CONFIG_X86_64),)
35
36ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),)
37
38obj-y += \
39efi_selftest_startimage_exit.o \
40efi_selftest_startimage_return.o
41
42targets += \
43efi_miniapp_file_image_exit.h \
44efi_miniapp_file_image_return.h \
45efi_selftest_miniapp_exit.efi \
46efi_selftest_miniapp_return.efi
47
48$(obj)/efi_miniapp_file_image_exit.h: $(obj)/efi_selftest_miniapp_exit.efi
49	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_exit.efi > \
50	$(obj)/efi_miniapp_file_image_exit.h
51
52$(obj)/efi_miniapp_file_image_return.h: $(obj)/efi_selftest_miniapp_return.efi
53	$(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_return.efi > \
54	$(obj)/efi_miniapp_file_image_return.h
55
56$(obj)/efi_selftest_startimage_exit.o: $(obj)/efi_miniapp_file_image_exit.h
57
58$(obj)/efi_selftest_startimage_return.o: $(obj)/efi_miniapp_file_image_return.h
59
60endif
61
62endif
63