mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-01 13:14:02 +00:00
there is a build error if we only build debug/release library because missing the build/modules folder Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> modified: Makefile modified: debug/Makefile modified: release/Makefile
26 lines
538 B
Makefile
26 lines
538 B
Makefile
#
|
|
# 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 $@) && mkdir -p $(HV_MODDIR); \
|
|
$(CC) $(patsubst %, -I%, $(INCLUDE_PATH)) -I. -c $(CFLAGS) $(ARCH_CFLAGS) $< -o $@ -MMD -MT $@
|