mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 09:41:30 +00:00
This patch is the initial patch for some APIs for client and debugger. Usercrash works as C/S model. The usercrash_c runs as the client of usercrash. File crash_dump.c provides the APIs for client and debugger to dump some crash information. Signed-off-by: xiaojin2 <xiaojing.liu@intel.com> Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com> Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> Acked-by: Eddie Dong <Eddie.dong@intel.com>
45 lines
1.3 KiB
Makefile
45 lines
1.3 KiB
Makefile
all: check_obj usercrash_s usercrash_c
|
|
|
|
CURRDIR := $(shell pwd)
|
|
INCLUDE += -I $(CURRDIR)/include/
|
|
|
|
LIBS = -levent -lpthread
|
|
|
|
usercrash_s: $(BUILDDIR)/usercrash/obj/protocol.o \
|
|
$(BUILDDIR)/usercrash/obj/server.o \
|
|
$(BUILDDIR)/common/obj/log_sys.o
|
|
$(CC) -g $(CFLAGS) $(LIBS) $(INCLUDE) $^ -o $(BUILDDIR)/usercrash/bin/$@ -lsystemd
|
|
|
|
usercrash_c: $(BUILDDIR)/usercrash/obj/protocol.o \
|
|
$(BUILDDIR)/usercrash/obj/client.o \
|
|
$(BUILDDIR)/usercrash/obj/crash_dump.o \
|
|
$(BUILDDIR)/common/obj/log_sys.o \
|
|
$(BUILDDIR)/common/obj/cmdutils.o \
|
|
$(BUILDDIR)/common/obj/fsutils.o \
|
|
$(BUILDDIR)/common/obj/strutils.o
|
|
$(CC) -g $(CFLAGS) $(INCLUDE) $^ -o $(BUILDDIR)/usercrash/bin/$@ -lsystemd
|
|
|
|
$(BUILDDIR)/usercrash/obj/%.o:%.c
|
|
$(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $<
|
|
|
|
check_obj:
|
|
@if [ ! -d $(BUILDDIR)/usercrash/bin ]; then \
|
|
mkdir -p $(BUILDDIR)/usercrash/bin ; \
|
|
fi
|
|
@if [ ! -d $(BUILDDIR)/usercrash/obj ]; then \
|
|
mkdir -p $(BUILDDIR)/usercrash/obj ; \
|
|
fi
|
|
|
|
.PHONY:clean
|
|
clean:
|
|
@echo "Clean objects and binaries"
|
|
@if [ -d $(BUILDDIR)/usercrash/obj ]; then \
|
|
find $(BUILDDIR)/usercrash/obj -name "*.o" -exec $(RM) {} \; 2>&1 || exit 0; \
|
|
fi
|
|
@if [ -d $(BUILDDIR)/usercrash/bin ]; then \
|
|
$(RM) -r $(BUILDDIR)/usercrash/bin ; \
|
|
fi
|
|
@if [ -d $(BUILDDIR)/usercrash/obj ]; then \
|
|
$(RM) -r $(BUILDDIR)/usercrash/obj ; \
|
|
fi
|