2018-05-15 09:09:20 +08:00
|
|
|
|
|
|
|
# global helper variables
|
|
|
|
T := $(CURDIR)
|
2018-05-17 16:44:11 +08:00
|
|
|
PLATFORM ?= uefi
|
|
|
|
RELEASE ?= 0
|
2018-05-15 09:09:20 +08:00
|
|
|
|
2018-05-23 19:24:29 +08:00
|
|
|
O ?= build
|
|
|
|
ROOT_OUT := $(shell mkdir -p $(O);cd $(O);pwd)
|
2018-05-15 09:09:20 +08:00
|
|
|
HV_OUT := $(ROOT_OUT)/hypervisor
|
|
|
|
DM_OUT := $(ROOT_OUT)/devicemodel
|
|
|
|
TOOLS_OUT := $(ROOT_OUT)/tools
|
2018-05-30 17:23:37 +08:00
|
|
|
MISC_OUT := $(ROOT_OUT)/misc
|
2018-05-30 02:16:56 +08:00
|
|
|
export TOOLS_OUT
|
2018-05-15 09:09:20 +08:00
|
|
|
|
2018-05-30 17:23:37 +08:00
|
|
|
.PHONY: all hypervisor devicemodel tools misc
|
|
|
|
all: hypervisor devicemodel tools misc
|
2018-05-15 09:09:20 +08:00
|
|
|
|
|
|
|
hypervisor:
|
2018-05-17 16:44:11 +08:00
|
|
|
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)
|
2018-05-15 09:09:20 +08:00
|
|
|
|
2018-05-24 17:39:59 +08:00
|
|
|
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)
|
|
|
|
|
2018-05-30 02:16:56 +08:00
|
|
|
devicemodel: tools
|
2018-05-17 06:59:53 +08:00
|
|
|
make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) clean
|
2018-05-17 02:21:26 +08:00
|
|
|
make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT)
|
2018-05-15 09:09:20 +08:00
|
|
|
|
|
|
|
tools:
|
|
|
|
mkdir -p $(TOOLS_OUT)
|
2018-05-17 06:59:53 +08:00
|
|
|
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)
|
2018-05-18 16:38:19 +08:00
|
|
|
make -C $(T)/tools/acrn-crashlog OUT_DIR=$(TOOLS_OUT) RELEASE=$(RELEASE)
|
2018-05-15 09:09:20 +08:00
|
|
|
|
2018-05-30 17:23:37 +08:00
|
|
|
misc: tools
|
|
|
|
mkdir -p $(MISC_OUT)
|
|
|
|
make -C $(T)/misc OUT_DIR=$(MISC_OUT)
|
|
|
|
|
2018-05-15 09:09:20 +08:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf $(ROOT_OUT)
|
2018-05-18 16:38:19 +08:00
|
|
|
|
2018-05-17 03:21:45 +08:00
|
|
|
.PHONY: install
|
2018-05-30 17:23:37 +08:00
|
|
|
install: hypervisor-install devicemodel-install tools-install misc-install
|
2018-05-15 09:09:20 +08:00
|
|
|
|
2018-05-17 03:21:45 +08:00
|
|
|
hypervisor-install:
|
2018-05-19 05:35:34 +08:00
|
|
|
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) PLATFORM=$(PLATFORM) RELEASE=$(RELEASE) install
|
2018-05-17 03:21:45 +08:00
|
|
|
|
2018-05-24 17:39:59 +08:00
|
|
|
sbl-hypervisor-install:
|
|
|
|
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl PLATFORM=sbl RELEASE=$(RELEASE) install
|
|
|
|
|
2018-05-17 03:21:45 +08:00
|
|
|
devicemodel-install:
|
|
|
|
make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) install
|
|
|
|
|
2018-05-17 06:59:53 +08:00
|
|
|
tools-install:
|
2018-05-17 03:21:45 +08:00
|
|
|
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
|
2018-05-18 16:38:19 +08:00
|
|
|
make -C $(T)/tools/acrn-crashlog OUT_DIR=$(TOOLS_OUT) install
|
2018-05-30 17:23:37 +08:00
|
|
|
|
|
|
|
misc-install:
|
|
|
|
make -C $(T)/misc OUT_DIR=$(MISC_OUT) install
|