Makefile:add targz-pkg entry in Makefile

User could use make targz-pkg command to generate tar package in
build directory,which could help user simplify the process
of installing acrn hypervisor in target board. user need to copy the
tarball package to target board,and extract it to "/" directory.

Tracked-On: #6355
Signed-off-by: liu hang1 <hang1.liu@intel.com>
Reviewed-by: VanCutsem, Geoffroy <geoffroy.vancutsem@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
liu hang1 2021-08-05 00:45:09 +08:00 committed by wenlingz
parent 578c18b962
commit d07bd78b13
3 changed files with 11 additions and 5 deletions

View File

@ -6,6 +6,10 @@ SHELL := /bin/bash
# global helper variables # global helper variables
T := $(CURDIR) T := $(CURDIR)
# ACRN Version Information
include VERSION
export FULL_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)$(EXTRA_VERSION)
ifdef TARGET_DIR ifdef TARGET_DIR
$(warning TARGET_DIR is obsoleted because generated configuration files are now stored in the build directory) $(warning TARGET_DIR is obsoleted because generated configuration files are now stored in the build directory)
endif endif
@ -69,6 +73,7 @@ HV_OUT := $(ROOT_OUT)/hypervisor
DM_OUT := $(ROOT_OUT)/devicemodel DM_OUT := $(ROOT_OUT)/devicemodel
TOOLS_OUT := $(ROOT_OUT)/misc TOOLS_OUT := $(ROOT_OUT)/misc
DOC_OUT := $(ROOT_OUT)/doc DOC_OUT := $(ROOT_OUT)/doc
TARBALL_OUT := $(ROOT_OUT)/tarball
BUILD_VERSION ?= BUILD_VERSION ?=
BUILD_TAG ?= BUILD_TAG ?=
HV_CFG_LOG = $(HV_OUT)/cfg.log HV_CFG_LOG = $(HV_OUT)/cfg.log
@ -175,3 +180,9 @@ tools-install:
life_mngr-install: life_mngr-install:
$(MAKE) -C $(T)/misc OUT_DIR=$(TOOLS_OUT) RELEASE=$(RELEASE) acrn-life-mngr-install $(MAKE) -C $(T)/misc OUT_DIR=$(TOOLS_OUT) RELEASE=$(RELEASE) acrn-life-mngr-install
.PHONY: targz-pkg
targz-pkg:
$(MAKE) install DESTDIR=$(TARBALL_OUT)
cd $(TARBALL_OUT) && \
tar -zcvf $(ROOT_OUT)/acrn-$(FULL_VERSION).tar.gz *

View File

@ -1,10 +1,8 @@
# #
# ACRN-DM # ACRN-DM
# #
include ../VERSION
include ../paths.make include ../paths.make
FULL_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)$(EXTRA_VERSION)
BASEDIR := $(shell pwd) BASEDIR := $(shell pwd)
DM_OBJDIR ?= $(CURDIR)/build DM_OBJDIR ?= $(CURDIR)/build
DM_BUILD_VERSION ?= DM_BUILD_VERSION ?=

View File

@ -2,9 +2,6 @@
# acrn-hypervisor/hypervisor/Makefile # acrn-hypervisor/hypervisor/Makefile
# #
include ../VERSION
FULL_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)$(EXTRA_VERSION)
API_MAJOR_VERSION=1 API_MAJOR_VERSION=1
API_MINOR_VERSION=0 API_MINOR_VERSION=0