diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2020-11-23 15:58:09 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-30 07:59:55 +0000 |
commit | 870e44a7b91a5db34123591d2cb99f491a0cb3b1 (patch) | |
tree | 5ce7bc281648472689d77c0a878c15f5e52577da /src/soc/amd/common/block/psp | |
parent | 63d36bc733a97ebf2a1c2f088d2fe834896d2087 (diff) |
soc/amd/common: simplify conditionals in Makefiles
If there are multiple statements that are conditional on the same
Kconfig option, group them and move the condition check around the
statement. If there's only one statement depending on one condition, use
the short form instead.
Change-Id: I89cb17954150c146ffc762d8cb2e3b3b374924de
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47876
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common/block/psp')
-rw-r--r-- | src/soc/amd/common/block/psp/Makefile.inc | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/src/soc/amd/common/block/psp/Makefile.inc b/src/soc/amd/common/block/psp/Makefile.inc index c2a33354ad..363a0abb7c 100644 --- a/src/soc/amd/common/block/psp/Makefile.inc +++ b/src/soc/amd/common/block/psp/Makefile.inc @@ -1,16 +1,27 @@ -bootblock-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP) += psp.c -bootblock-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN1) += psp_gen1.c -bootblock-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN2) += psp_gen2.c - -romstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP) += psp.c -romstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN1) += psp_gen1.c -romstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN2) += psp_gen2.c - -ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP) += psp.c -ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN1) += psp_gen1.c -ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN2) += psp_gen2.c - -smm-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP) += psp.c -smm-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP) += psp_smm.c -smm-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN1) += psp_gen1.c -smm-$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN2) += psp_gen2.c +ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_PSP),y) + +bootblock-y += psp.c +romstage-y += psp.c +ramstage-y += psp.c +smm-y += psp.c +smm-y += psp_smm.c + +endif # CONFIG_SOC_AMD_COMMON_BLOCK_PSP + +ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN1),y) + +bootblock-y += psp_gen1.c +romstage-y += psp_gen1.c +ramstage-y += psp_gen1.c +smm-y += psp_gen1.c + +endif # CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN1 + +ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN2),y) + +bootblock-y += psp_gen2.c +romstage-y += psp_gen2.c +ramstage-y += psp_gen2.c +smm-y += psp_gen2.c + +endif # CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN2 |