From: Simon Glass Date: Thu, 26 Sep 2024 21:59:33 +0000 (+0200) Subject: efi_loader: Shorten the app rules X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=0cee36784863ef7c84e2ba1934f291a38a0dd99a;p=u-boot.git efi_loader: Shorten the app rules We have quite a few apps now, so create a way to specify them as a list rather than repeating the same rules again and again. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index 27dbd9e760..660368b9d8 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -22,29 +22,13 @@ CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI) CFLAGS_initrddump.o := $(CFLAGS_EFI) -Os -ffreestanding CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI) -ifdef CONFIG_RISCV -always += boothart.efi -targets += boothart.o -endif - -ifneq ($(CONFIG_BOOTEFI_HELLO_COMPILE),) -always += helloworld.efi -targets += helloworld.o -endif - -ifneq ($(CONFIG_GENERATE_SMBIOS_TABLE),) -always += smbiosdump.efi -targets += smbiosdump.o -endif - +# These are the apps that are built +apps-$(CONFIG_RISCV) += boothart +apps-$(CONFIG_BOOTEFI_HELLO_COMPILE) += helloworld +apps-$(CONFIG_GENERATE_SMBIOS_TABLE) += smbiosdump +apps-$(CONFIG_EFI_LOAD_FILE2_INITRD) += initrddump ifeq ($(CONFIG_GENERATE_ACPI_TABLE),) -always += dtbdump.efi -targets += dtbdump.o -endif - -ifdef CONFIG_EFI_LOAD_FILE2_INITRD -always += initrddump.efi -targets += initrddump.o +apps-y += dtbdump endif obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o @@ -95,3 +79,6 @@ obj-$(CONFIG_EFI_ECPT) += efi_conformance.o EFI_VAR_SEED_FILE := $(subst $\",,$(CONFIG_EFI_VAR_SEED_FILE)) $(obj)/efi_var_seed.o: $(srctree)/$(EFI_VAR_SEED_FILE) + +always += $(foreach f,$(apps-y),$(f).efi) +targets += $(foreach f,$(apps-y),$(f).o)