mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 09:41:30 +00:00
This is the first patch of acrn-crashlog. This patch initializes the framework of acrn-crashlog: acrnprobe, common, data, and usercrash. And it initializes the Makefile for each part. Signed-off-by: Liu Xinwu <xinwu.liu@intel.com> Signed-off-by: CHEN Gang <gang.c.chen@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>
34 lines
966 B
Makefile
34 lines
966 B
Makefile
all: check_obj usercrash_s usercrash_c
|
|
|
|
LIBS = -levent -lpthread
|
|
|
|
usercrash_s: $(BUILDDIR)/usercrash/obj/server.o
|
|
$(CC) -g $(CFLAGS) $(LIBS) $(INCLUDE) $^ -o $(BUILDDIR)/usercrash/bin/$@ -lsystemd
|
|
|
|
usercrash_c: $(BUILDDIR)/usercrash/obj/client.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
|