mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 12:19:06 +00:00
hv: enhance Makefile to compile debug/release into 2 libraries
enhance Makefile to compile debug/release into 2 libraries v1 -> v2: * auto make all the libraries Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
25
hypervisor/release/Makefile
Normal file
25
hypervisor/release/Makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# ACRN Hypervisor Static Library for Release Version
|
||||
#
|
||||
|
||||
FILE_PATH := $(dir $(MKFL_NAME))
|
||||
SRCS += $(wildcard $(FILE_PATH)/*.c)
|
||||
OBJS += $(patsubst %.c,$(HV_OBJDIR)/%.o,$(SRCS))
|
||||
|
||||
.PHONY: default
|
||||
default: lib
|
||||
|
||||
ifeq ($(CONFIG_RELEASE),y)
|
||||
lib: $(OBJS)
|
||||
$(AR) $(ARFLAGS) $(LIB_RELEASE) $(OBJS)
|
||||
endif
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
|
||||
-include $(OBJS:.o=.d)
|
||||
|
||||
$(HV_OBJDIR)/%.o: %.c
|
||||
[ ! -e $@ ] && mkdir -p $(dir $@); \
|
||||
$(CC) $(patsubst %, -I%, $(INCLUDE_PATH)) -I. -c $(CFLAGS) $(ARCH_CFLAGS) $< -o $@ -MMD -MT $@
|
Reference in New Issue
Block a user