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-06-12 17:38:43 +08:00
|
|
|
DOC_OUT := $(ROOT_OUT)/doc
|
2018-08-06 10:09:27 +08:00
|
|
|
BUILD_VERSION ?=
|
|
|
|
BUILD_TAG ?=
|
2018-05-30 02:16:56 +08:00
|
|
|
export TOOLS_OUT
|
2018-05-15 09:09:20 +08:00
|
|
|
|
2018-06-12 17:38:43 +08:00
|
|
|
.PHONY: all hypervisor devicemodel tools misc doc
|
2018-05-30 17:23:37 +08:00
|
|
|
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-08-06 10:09:27 +08:00
|
|
|
make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) DM_BUILD_VERSION=$(BUILD_VERSION) DM_BUILD_TAG=$(BUILD_TAG)
|
2018-05-15 09:09:20 +08:00
|
|
|
|
|
|
|
tools:
|
|
|
|
mkdir -p $(TOOLS_OUT)
|
2018-06-04 15:57:25 +08:00
|
|
|
make -C $(T)/tools 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-06-12 17:38:43 +08:00
|
|
|
doc:
|
|
|
|
make -C $(T)/doc html BUILDDIR=$(DOC_OUT)
|
|
|
|
|
2018-05-15 09:09:20 +08:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2018-06-04 15:57:25 +08:00
|
|
|
make -C $(T)/tools OUT_DIR=$(TOOLS_OUT) clean
|
2018-06-12 17:38:43 +08:00
|
|
|
make -C $(T)/doc BUILDDIR=$(DOC_OUT) clean
|
2018-05-15 09:09:20 +08:00
|
|
|
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-06-04 15:57:25 +08:00
|
|
|
make -C $(T)/tools OUT_DIR=$(TOOLS_OUT) install
|
2018-05-30 17:23:37 +08:00
|
|
|
|
|
|
|
misc-install:
|
|
|
|
make -C $(T)/misc OUT_DIR=$(MISC_OUT) install
|