mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-05 18:25:05 +00:00
Makefile: prefer RELEASE=y|n over RELEASE=0|1
For clarity, we now prefer y|n over 0|1 as the values of boolean options on make command lines. This patch applies this preference to the Makefile of the device model and tools, while RELEASE=0|1 is still supported for backward compatibility. Tracked-On: #5772 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
b5a97d1dfa
commit
d5f1a44d65
9
Makefile
9
Makefile
@ -54,6 +54,15 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
# Backward-compatibility for RELEASE=(0|1)
|
||||
ifeq ($(RELEASE),1)
|
||||
override RELEASE := y
|
||||
else
|
||||
ifeq ($(RELEASE),0)
|
||||
override RELEASE := n
|
||||
endif
|
||||
endif
|
||||
|
||||
BOARD ?= kbl-nuc-i7
|
||||
|
||||
ifeq ($(BOARD), apl-nuc)
|
||||
|
@ -11,7 +11,19 @@ DM_BUILD_VERSION ?=
|
||||
DM_BUILD_TAG ?=
|
||||
|
||||
CC ?= gcc
|
||||
RELEASE ?= 0
|
||||
|
||||
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
|
||||
|
||||
CFLAGS := -g -O0 -std=gnu11
|
||||
CFLAGS += -D_GNU_SOURCE
|
||||
@ -52,7 +64,7 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(RELEASE),0)
|
||||
ifeq ($(RELEASE),n)
|
||||
CFLAGS += -DDM_DEBUG
|
||||
else
|
||||
LDFLAGS += -s
|
||||
|
@ -99,9 +99,9 @@ ifdef RELEASE
|
||||
endif
|
||||
else
|
||||
ifdef CONFIG_RELEASE
|
||||
RELEASE := $(CONFIG_RELEASE)
|
||||
override RELEASE := $(CONFIG_RELEASE)
|
||||
else
|
||||
RELEASE := $(1)
|
||||
override RELEASE := $(1)
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
@ -1,9 +1,21 @@
|
||||
T := $(CURDIR)
|
||||
OUT_DIR ?= $(shell mkdir -p $(T)/build;cd $(T)/build;pwd)
|
||||
RELEASE ?= 0
|
||||
|
||||
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
|
||||
|
||||
.PHONY: all acrn-crashlog acrnlog acrn-manager acrntrace acrnbridge life_mngr
|
||||
ifeq ($(RELEASE),0)
|
||||
ifeq ($(RELEASE),n)
|
||||
all: acrn-crashlog acrnlog acrn-manager acrntrace acrnbridge life_mngr
|
||||
else
|
||||
all: acrn-manager acrnbridge life_mngr
|
||||
@ -37,7 +49,7 @@ clean:
|
||||
rm -rf $(OUT_DIR)
|
||||
|
||||
.PHONY: install
|
||||
ifeq ($(RELEASE),0)
|
||||
ifeq ($(RELEASE),n)
|
||||
install: acrn-crashlog-install acrnlog-install acrn-manager-install acrntrace-install acrnbridge-install \
|
||||
acrn-life-mngr-install
|
||||
else
|
||||
|
@ -9,9 +9,21 @@ OUT_DIR ?= $(BASEDIR)
|
||||
BUILDDIR := $(OUT_DIR)/acrn-crashlog
|
||||
CC ?= gcc
|
||||
RM = rm
|
||||
RELEASE ?= 0
|
||||
|
||||
ifeq ($(RELEASE),0)
|
||||
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
|
||||
|
||||
ifeq ($(RELEASE),n)
|
||||
CFLAGS += -DDEBUG_ACRN_CRASHLOG
|
||||
endif
|
||||
|
||||
|
@ -3,7 +3,19 @@ include ../../../paths.make
|
||||
T := $(CURDIR)
|
||||
OUT_DIR ?= $(shell mkdir -p $(T)/build;cd $(T)/build;pwd)
|
||||
CC ?= gcc
|
||||
RELEASE ?= 0
|
||||
|
||||
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
|
||||
|
||||
MANAGER_CFLAGS := -g -O0 -std=gnu11
|
||||
MANAGER_CFLAGS += -D_GNU_SOURCE
|
||||
@ -50,7 +62,7 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(RELEASE),0)
|
||||
ifeq ($(RELEASE),n)
|
||||
MANAGER_CFLAGS += -g -DMNGR_DEBUG
|
||||
else
|
||||
MANAGER_LDFLAGS += -s
|
||||
|
Loading…
Reference in New Issue
Block a user