Commit 6d9e6d15 authored by Pavel Emelyanov's avatar Pavel Emelyanov

soccr: Wire into builder

For now build the .a library not to produce criu wrappers.
Next version should include the .so library as well.
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 741719e8
......@@ -200,6 +200,16 @@ $(eval $(call gen-built-in,images))
.PHONY: .FORCE
#
# Next the socket CR library
#
SOCCR_A := soccr/libsoccr.a
soccr/%: $(CONFIG_HEADER) .FORCE
$(Q) $(MAKE) $(build)=soccr $@
soccr/built-in.o: $(CONFIG_HEADER) .FORCE
$(Q) $(MAKE) $(build)=soccr all
$(SOCCR_A): |soccr/built-in.o
#
# CRIU building done in own directory
# with slightly different rules so we
......@@ -210,7 +220,7 @@ $(eval $(call gen-built-in,images))
# the nmk so we can reuse it there.
criu/%: images/built-in.o $(VERSION_HEADER) $(CONFIG_HEADER) .FORCE
$(Q) $(MAKE) $(build)=criu $@
criu: images/built-in.o $(VERSION_HEADER) $(CONFIG_HEADER)
criu: images/built-in.o $(SOCCR_A) $(VERSION_HEADER) $(CONFIG_HEADER)
$(Q) $(MAKE) $(build)=criu all
.PHONY: criu
......@@ -234,12 +244,14 @@ subclean:
clean: subclean
$(Q) $(MAKE) $(build)=images $@
$(Q) $(MAKE) $(build)=criu $@
$(Q) $(MAKE) $(build)=soccr $@
.PHONY: clean
# mrproper depends on clean in nmk
mrproper: subclean
$(Q) $(MAKE) $(build)=images $@
$(Q) $(MAKE) $(build)=criu $@
$(Q) $(MAKE) $(build)=soccr $@
$(Q) $(RM) $(CONFIG_HEADER)
$(Q) $(RM) $(VERSION_HEADER)
$(Q) $(RM) include/common/asm
......
......@@ -17,3 +17,9 @@ CRIU_SO_VERSION_MINOR := 0
export CRIU_SO_VERSION_MAJOR CRIU_SO_VERSION_MINOR
#
# SOCCR library.
SOCCR_SO_VERSION_MAJOR := 1
SOCCR_SO_VERSION_MINOR := 0
export SOCCR_SO_VERSION_MAJOR SOCCR_SO_VERSION_MINOR
......@@ -19,7 +19,7 @@ REQ-DEB-PKG-NAMES += libcap-dev
REQ-DEB-PKG-TEST-NAMES += libaio-dev
export LIBS += -lrt -lpthread -lprotobuf-c -ldl -lnl-3
export LIBS += -lrt -lpthread -lprotobuf-c -ldl -lnl-3 -lsoccr -Lsoccr/
check-packages-failed:
$(warning Can not find some of the required libraries)
......
......@@ -8,6 +8,8 @@
#include <sched.h>
#include <netinet/in.h>
#include "../soccr/soccr.h"
#include "cr_options.h"
#include "util.h"
#include "common/list.h"
......
lib-name := libsoccr.a
lib-y += soccr.o
#include "soccr.h"
#ifndef __LIBSOCCR_H__
#define __LIBSOCCR_H__
#endif
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