payloads/tianocore: Limit legacy build options to CorebootPayloadPkg

Limited to two legacy build options to only be set when
CorebootPayloadPkg is used, as they don't exist in UefiPayloadPkg.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I71aaa940543075962e167b52b23f45976d39c616
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65779
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
diff --git a/payloads/external/tianocore/Makefile b/payloads/external/tianocore/Makefile
index 2534132..7a3119e 100644
--- a/payloads/external/tianocore/Makefile
+++ b/payloads/external/tianocore/Makefile
@@ -92,6 +92,7 @@
 # The below are legacy options only available in CorebootPayloadPkg:
 #
 # PCIE_BASE			= 0
+ifeq ($(CONFIG_TIANOCORE_COREBOOTPAYLOAD),y)
 ifneq ($(CONFIG_ECAM_MMCONF_BASE_ADDRESS),)
 BUILD_STR += -D PCIE_BASE=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS)
 endif
@@ -99,6 +100,7 @@
 ifeq ($(CONFIG_TIANOCORE_USE_8254_TIMER),y)
 BUILD_STR += -D USE_HPET_TIMER=TRUE
 endif
+endif # CONFIG_TIANOCORE_COREBOOTPAYLOAD
 
 bootloader = $(word 8,$(subst /, ,$(BUILD_STR)))