HV: makefile: to avoid duplicated build libs

1. improve makefile to avoid duplicated build libs when make
in acrn-hypervisor/hypervisor directory to build HV only.

2. for debug/release library just select one makefile to build

Tracked-On: #2412
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
This commit is contained in:
Minggui Cao
2020-05-07 15:09:14 +08:00
committed by wenlingz
parent f994b5ffaf
commit 42d5533e6f
3 changed files with 27 additions and 32 deletions

View File

@@ -7,10 +7,10 @@ SRCS += $(wildcard $(FILE_PATH)/*.c)
OBJS += $(patsubst %.c,$(HV_OBJDIR)/%.o,$(SRCS))
.PHONY: default
default: lib
default: $(LIB_RELEASE)
ifeq ($(CONFIG_RELEASE),y)
lib: $(OBJS)
$(LIB_RELEASE): $(OBJS)
$(AR) $(ARFLAGS) $(LIB_RELEASE) $(OBJS)
endif