Commit 27f9b033 authored by Ruslan Kupreev Руслан's avatar Ruslan Kupreev Руслан Committed by Pavel Emelyanov

v2 criu: Initial skeleton for criu library

Add target lib to Makefile for criu library.
Created directory lib and add there Makefile and criu.c - skelettons for criu library.
Signed-off-by: 's avatarRuslan Kupreev <kupruser@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 987de2de
...@@ -101,6 +101,7 @@ endif ...@@ -101,6 +101,7 @@ endif
CFLAGS += $(WARNINGS) $(DEFINES) CFLAGS += $(WARNINGS) $(DEFINES)
SYSCALL-LIB := arch/$(ARCH)/syscalls.built-in.o SYSCALL-LIB := arch/$(ARCH)/syscalls.built-in.o
ARCH-LIB := arch/$(ARCH)/crtools.built-in.o ARCH-LIB := arch/$(ARCH)/crtools.built-in.o
CRIU-LIB := lib/libcriu.so
export CC MAKE CFLAGS LIBS ARCH DEFINES MAKEFLAGS export CC MAKE CFLAGS LIBS ARCH DEFINES MAKEFLAGS
export SRC_DIR SYSCALL-LIB SH RM ARCH_DIR OBJCOPY LDARCH LD export SRC_DIR SYSCALL-LIB SH RM ARCH_DIR OBJCOPY LDARCH LD
...@@ -119,15 +120,18 @@ build-crtools := -r -R -f scripts/Makefile.build makefile=Makefile.crtools obj ...@@ -119,15 +120,18 @@ build-crtools := -r -R -f scripts/Makefile.build makefile=Makefile.crtools obj
PROGRAM := criu PROGRAM := criu
.PHONY: all zdtm test rebuild clean distclean tags cscope \ .PHONY: all zdtm test rebuild clean distclean tags cscope \
docs help pie protobuf arch/$(ARCH) clean-built docs help pie protobuf arch/$(ARCH) clean-built lib
ifeq ($(GCOV),1) ifeq ($(GCOV),1)
%.o $(PROGRAM): override CFLAGS += --coverage %.o $(PROGRAM): override CFLAGS += --coverage
endif endif
all: config pie $(VERSION_HEADER) all: config pie $(VERSION_HEADER) lib
$(Q) $(MAKE) $(PROGRAM) $(Q) $(MAKE) $(PROGRAM)
lib: $(VERSION_HEADER)
$(Q) $(MAKE) -C lib all
protobuf/%:: protobuf/%::
$(Q) $(MAKE) $(build)=protobuf $@ $(Q) $(MAKE) $(build)=protobuf $@
protobuf: protobuf:
...@@ -175,6 +179,7 @@ clean-built: ...@@ -175,6 +179,7 @@ clean-built:
$(Q) $(MAKE) -C Documentation clean $(Q) $(MAKE) -C Documentation clean
$(Q) $(RM) ./include/config.h $(Q) $(RM) ./include/config.h
$(Q) $(RM) ./$(PROGRAM) $(Q) $(RM) ./$(PROGRAM)
$(Q) $(MAKE) -C lib clean
rebuild: clean-built rebuild: clean-built
$(E) " FORCE-REBUILD" $(E) " FORCE-REBUILD"
......
.PHONY: all clean
all: libcriu.so
libcriu.so: criu.o
$(Q) $(CC) $(CFLAGS) -shared -o $@ criu.o
criu.o:
$(Q) $(CC) $(CFLAGS) -fPIC -c criu.c -I ../include/
clean:
$(Q) $(RM) -f *.o
$(Q) $(RM) -f *.so
#include "version.h"
const char *criu_lib_version = version;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment