acrn-hypervisor/Makefile
Miguel Bernal Marin 7811bdd51e Makefile: add a target to build sbl hypervisor
To build with only one command the sbl and efi hypervisor a target was
added which build the SBL hypervisor version.

Now you can call "make all sbl-hypervisor" and
"make install sbl-hypervisor-install"

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2018-05-24 19:35:03 +08:00

57 lines
1.7 KiB
Makefile

# global helper variables
T := $(CURDIR)
PLATFORM ?= uefi
RELEASE ?= 0
O ?= build
ROOT_OUT := $(shell mkdir -p $(O);cd $(O);pwd)
HV_OUT := $(ROOT_OUT)/hypervisor
DM_OUT := $(ROOT_OUT)/devicemodel
TOOLS_OUT := $(ROOT_OUT)/tools
.PHONY: all hypervisor devicemodel tools
all: hypervisor devicemodel tools
hypervisor:
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) PLATFORM=$(PLATFORM) RELEASE=$(RELEASE) clean
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) PLATFORM=$(PLATFORM) RELEASE=$(RELEASE)
sbl-hypervisor:
@mkdir -p $(HV_OUT)-sbl
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl PLATFORM=sbl RELEASE=$(RELEASE) clean
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl PLATFORM=sbl RELEASE=$(RELEASE)
devicemodel:
make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) clean
make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT)
tools:
mkdir -p $(TOOLS_OUT)
make -C $(T)/tools/acrnlog OUT_DIR=$(TOOLS_OUT)
make -C $(T)/tools/acrn-manager OUT_DIR=$(TOOLS_OUT)
make -C $(T)/tools/acrntrace OUT_DIR=$(TOOLS_OUT)
make -C $(T)/tools/acrn-crashlog OUT_DIR=$(TOOLS_OUT) RELEASE=$(RELEASE)
.PHONY: clean
clean:
rm -rf $(ROOT_OUT)
.PHONY: install
install: hypervisor-install devicemodel-install tools-install
hypervisor-install:
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) PLATFORM=$(PLATFORM) RELEASE=$(RELEASE) install
sbl-hypervisor-install:
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl PLATFORM=sbl RELEASE=$(RELEASE) install
devicemodel-install:
make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) install
tools-install:
make -C $(T)/tools/acrnlog OUT_DIR=$(TOOLS_OUT) install
make -C $(T)/tools/acrn-manager OUT_DIR=$(TOOLS_OUT) install
make -C $(T)/tools/acrntrace OUT_DIR=$(TOOLS_OUT) install
make -C $(T)/tools/acrn-crashlog OUT_DIR=$(TOOLS_OUT) install