Skip to content

Commit

Permalink
Makefile: eliminate mistakes due to deprecated PLATFORM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tw4452852 authored and wenlingz committed Dec 26, 2018
1 parent 55691ae commit c932faa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c932faa

Please sign in to comment.