Makefile: eliminate mistakes due to deprecated PLATFORM

PLATFORM is deprecated, let's use it only for board detection

Tracked-On: #1995
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
This commit is contained in:
Tw 2018-12-18 13:42:53 +08:00 committed by wenlingz
parent 55691aed46
commit c932faa241
1 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,7 @@ BOARD ?= apl-mrb
else ifeq ($(PLATFORM),uefi)
BOARD ?= apl-nuc
endif
undefine PLATFORM
ifndef BOARD
$(error BOARD must be set (apl-mrb, apl-nuc, cb2_dnv, nuc6cayh)
@ -47,7 +48,7 @@ all: hypervisor devicemodel tools
hypervisor:
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD=$(BOARD) FIRMWARE=$(FIRMWARE) RELEASE=$(RELEASE) clean
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD=$(BOARD) FIRMWARE=$(FIRMWARE) RELEASE=$(RELEASE)
ifeq ($(PLATFORM),uefi)
ifeq ($(FIRMWARE),uefi)
echo "building hypervisor as EFI executable..."
make -C $(T)/efi-stub HV_OBJDIR=$(HV_OUT) EFI_OBJDIR=$(EFI_OUT)
endif
@ -78,10 +79,10 @@ clean:
install: hypervisor-install devicemodel-install tools-install
hypervisor-install:
ifeq ($(PLATFORM),sbl)
ifeq ($(FIRMWARE),sbl)
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD=$(BOARD) FIRMWARE=$(FIRMWARE) RELEASE=$(RELEASE) install
endif
ifeq ($(PLATFORM),uefi)
ifeq ($(FIRMWARE),uefi)
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD=$(BOARD) FIRMWARE=$(FIRMWARE) RELEASE=$(RELEASE)
make -C $(T)/efi-stub HV_OBJDIR=$(HV_OUT) EFI_OBJDIR=$(EFI_OUT) all install
endif