2018-06-04 15:57:25 +08:00
|
|
|
T := $(CURDIR)
|
2018-06-13 15:54:22 +08:00
|
|
|
OUT_DIR ?= $(shell mkdir -p $(T)/build;cd $(T)/build;pwd)
|
2021-02-28 10:59:52 +08:00
|
|
|
|
|
|
|
ifndef RELEASE
|
|
|
|
override RELEASE := n
|
|
|
|
else
|
|
|
|
# Backward-compatibility for RELEASE=(0|1)
|
|
|
|
ifeq ($(RELEASE),1)
|
|
|
|
override RELEASE := y
|
|
|
|
else
|
|
|
|
ifeq ($(RELEASE),0)
|
|
|
|
override RELEASE := n
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2018-06-04 15:57:25 +08:00
|
|
|
|
2021-03-02 06:32:12 +08:00
|
|
|
SERVICES_OUT ?= $(shell mkdir -p $(OUT_DIR)/services;cd $(OUT_DIR)/services;pwd)
|
2021-02-28 10:59:52 +08:00
|
|
|
ifeq ($(RELEASE),n)
|
2021-03-02 06:32:12 +08:00
|
|
|
DEBUG_OUT ?= $(shell mkdir -p $(OUT_DIR)/debug_tools;cd $(OUT_DIR)/debug_tools;pwd)
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: all acrn-manager acrnbridge life_mngr acrn-crashlog acrnlog acrntrace
|
|
|
|
ifeq ($(RELEASE),n)
|
2021-03-03 17:24:38 +08:00
|
|
|
all: acrn-manager acrnbridge acrn-crashlog acrnlog acrntrace
|
2018-09-06 16:40:05 +08:00
|
|
|
else
|
2021-03-03 17:24:38 +08:00
|
|
|
all: acrn-manager acrnbridge
|
2018-09-06 16:40:05 +08:00
|
|
|
endif
|
2018-06-04 15:57:25 +08:00
|
|
|
|
|
|
|
acrn-manager:
|
2021-03-02 06:32:12 +08:00
|
|
|
$(MAKE) -C $(T)/services/acrn_manager OUT_DIR=$(SERVICES_OUT) RELEASE=$(RELEASE)
|
2018-06-04 15:57:25 +08:00
|
|
|
|
2018-06-08 10:58:18 +08:00
|
|
|
acrnbridge:
|
2021-03-02 06:32:12 +08:00
|
|
|
$(MAKE) -C $(T)/services/acrn_bridge OUT_DIR=$(SERVICES_OUT)
|
2018-06-08 10:58:18 +08:00
|
|
|
|
2019-09-19 18:11:42 +08:00
|
|
|
life_mngr:
|
2021-03-02 06:32:12 +08:00
|
|
|
$(MAKE) -C $(T)/services/life_mngr OUT_DIR=$(SERVICES_OUT)
|
|
|
|
|
|
|
|
acrn-crashlog:
|
|
|
|
$(MAKE) -C $(T)/debug_tools/acrn_crashlog OUT_DIR=$(DEBUG_OUT) RELEASE=$(RELEASE)
|
|
|
|
|
|
|
|
acrnlog:
|
|
|
|
$(MAKE) -C $(T)/debug_tools/acrn_log OUT_DIR=$(DEBUG_OUT)
|
|
|
|
|
|
|
|
acrntrace:
|
|
|
|
$(MAKE) -C $(T)/debug_tools/acrn_trace OUT_DIR=$(DEBUG_OUT)
|
2019-09-19 18:11:42 +08:00
|
|
|
|
2018-06-04 15:57:25 +08:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2021-03-02 06:32:12 +08:00
|
|
|
$(MAKE) -C $(T)/services/acrn_manager OUT_DIR=$(SERVICES_OUT) clean
|
|
|
|
$(MAKE) -C $(T)/services/life_mngr OUT_DIR=$(SERVICES_OUT) clean
|
|
|
|
$(MAKE) -C $(T)/debug_tools/acrn_crashlog OUT_DIR=$(DEBUG_OUT) clean
|
|
|
|
$(MAKE) -C $(T)/debug_tools/acrn_trace OUT_DIR=$(DEBUG_OUT) clean
|
|
|
|
$(MAKE) -C $(T)/debug_tools/acrn_log OUT_DIR=$(DEBUG_OUT) clean
|
2018-06-04 15:57:25 +08:00
|
|
|
rm -rf $(OUT_DIR)
|
|
|
|
|
|
|
|
.PHONY: install
|
2021-02-28 10:59:52 +08:00
|
|
|
ifeq ($(RELEASE),n)
|
2021-03-03 17:24:38 +08:00
|
|
|
install: acrn-manager-install acrnbridge-install acrn-crashlog-install \
|
2021-03-02 06:32:12 +08:00
|
|
|
acrnlog-install acrntrace-install
|
2018-09-06 16:40:05 +08:00
|
|
|
else
|
2021-03-03 17:24:38 +08:00
|
|
|
install: acrn-manager-install acrnbridge-install
|
2018-09-06 16:40:05 +08:00
|
|
|
endif
|
2018-06-04 15:57:25 +08:00
|
|
|
|
2018-06-07 16:47:57 +08:00
|
|
|
acrn-manager-install:
|
2021-03-02 06:32:12 +08:00
|
|
|
$(MAKE) -C $(T)/services/acrn_manager OUT_DIR=$(SERVICES_OUT) install
|
2018-06-08 10:58:18 +08:00
|
|
|
|
|
|
|
acrnbridge-install:
|
2021-03-02 06:32:12 +08:00
|
|
|
$(MAKE) -C $(T)/services/acrn_bridge OUT_DIR=$(SERVICES_OUT) install
|
2020-06-02 11:45:00 +08:00
|
|
|
|
|
|
|
acrn-life-mngr-install:
|
2021-03-02 06:32:12 +08:00
|
|
|
$(MAKE) -C $(T)/services/life_mngr OUT_DIR=$(SERVICES_OUT) install
|
|
|
|
|
|
|
|
acrn-crashlog-install:
|
|
|
|
$(MAKE) -C $(T)/debug_tools/acrn_crashlog OUT_DIR=$(DEBUG_OUT) install
|
|
|
|
|
|
|
|
acrnlog-install:
|
|
|
|
$(MAKE) -C $(T)/debug_tools/acrn_log OUT_DIR=$(DEBUG_OUT) install
|
|
|
|
|
|
|
|
acrntrace-install:
|
|
|
|
$(MAKE) -C $(T)/debug_tools/acrn_trace OUT_DIR=$(DEBUG_OUT) install
|