diff options
author | Cyrill Gorcunov <gorcunov@openvz.org> | 2016-02-15 15:26:55 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@virtuozzo.com> | 2016-02-15 15:32:45 +0300 |
commit | db6cb69394a7618532791af801e65a2f32e54c98 (patch) | |
tree | be12fdabb77ca4e7695e2af184c302a4a992505e /lib | |
parent | 3410d39514ae789a7681737dcb297aefe5305b8c (diff) |
build: Move everything criu related into criu directory
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 6 | ||||
-rw-r--r-- | lib/c/Makefile | 10 | ||||
-rw-r--r-- | lib/py/Makefile | 2 | ||||
-rw-r--r-- | lib/py/images/Makefile | 19 |
4 files changed, 16 insertions, 21 deletions
diff --git a/lib/Makefile b/lib/Makefile index f07e07b90..d1b045059 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -15,11 +15,11 @@ c/built-in.o: $(call msg-gen, $@) $(Q) $(MAKE) $(build)=c all -ccflags-so += $(CFLAGS) -rdynamic -Wl,-soname,$(lib-so).so.$(VERSION_SO_MAJOR) +cflags-so += $(CFLAGS) -rdynamic -Wl,-soname,$(lib-so).so.$(VERSION_SO_MAJOR) ldflags-so += -lprotobuf-c c/$(CRIU_SO): c/built-in.o $(call msg-link, $@) - $(Q) $(CC) -shared $(ccflags-so) -o $@ $^ $(ldflags-so) $(LDFLAGS) + $(Q) $(CC) -shared $(cflags-so) -o $@ $^ $(ldflags-so) $(LDFLAGS) lib-c: c/$(CRIU_SO) PHONY += lib-c @@ -40,3 +40,5 @@ clean: all: $(PHONY) @true PHONY += all + +.PHONY: $(PHONY) clean diff --git a/lib/c/Makefile b/lib/c/Makefile index 16b4ef194..21bf85614 100644 --- a/lib/c/Makefile +++ b/lib/c/Makefile @@ -1,13 +1,7 @@ obj-y += criu.o obj-y += $(SRC_DIR)/images/rpc.pb-c.o -ccflags-y += -iquote $(SRC_DIR)/crtools/$(ARCH_DIR)/include -ccflags-y += -iquote $(SRC_DIR)/crtools/include -iquote $(obj)/.. +ccflags-y += -iquote $(SRC_DIR)/criu/$(ARCH_DIR)/include +ccflags-y += -iquote $(SRC_DIR)/criu/include -iquote $(obj)/.. ccflags-y += -iquote $(SRC_DIR)/images ccflags-y += -fPIC -Wa,--noexecstack -fno-stack-protector - -# -# Remove once criu moved into proper place. -ccflags-y += -iquote $(SRC_DIR)/$(ARCH_DIR)/include -ccflags-y += -iquote $(SRC_DIR)/include -iquote $(obj)/.. -ccflags-y += -iquote $(SRC_DIR)/images diff --git a/lib/py/Makefile b/lib/py/Makefile index 135fe1c01..582cc93de 100644 --- a/lib/py/Makefile +++ b/lib/py/Makefile @@ -8,7 +8,7 @@ images: # rpc_pb2.py doesn't depend on any other file, so # it is safe to rename it, dropping ugly _pb2 suffix. rpc.py: - $(Q) protoc -I=$(SRC_DIR)/protobuf/ --python_out=./ $(SRC_DIR)/protobuf/$(@:.py=.proto) + $(Q) protoc -I=$(SRC_DIR)/images/ --python_out=./ $(SRC_DIR)/images/$(@:.py=.proto) $(Q) mv $(@:.py=_pb2.py) $@ clean: diff --git a/lib/py/images/Makefile b/lib/py/images/Makefile index 98a450065..c8a748e5c 100644 --- a/lib/py/images/Makefile +++ b/lib/py/images/Makefile @@ -1,22 +1,21 @@ -all: pb.py protobuf magic.py +all: pb.py images magic.py -.PHONY: all protobuf clean pb.py +.PHONY: all images clean pb.py -proto := $(filter-out $(SRC_DIR)/protobuf/rpc.proto, $(sort $(wildcard $(SRC_DIR)/protobuf/*.proto))) +proto := $(filter-out $(SRC_DIR)/images/rpc.proto, $(sort $(wildcard $(SRC_DIR)/images/*.proto))) proto-py-modules := $(foreach m,$(proto),$(subst -,_,$(notdir $(m:.proto=_pb2)))) -# We don't need rpc_pb2.py here, as it is not related to the -# images. +# We don't need rpc_pb2.py here, as it is not related to the images. # Unfortunately, we can't drop ugly _pb2 suffixes here, because # some _pb2 files depend on others _pb2 files. -protobuf: - $(Q) protoc -I=$(SRC_DIR)/protobuf -I=/usr/include/ --python_out=./ $(proto) +images: + $(Q) protoc -I=$(SRC_DIR)/images -I=/usr/include/ --python_out=./ $(proto) -magic.py: $(SRC_DIR)/scripts/magic-gen.py $(SRC_DIR)/include/magic.h - $(E) " GEN " $@ +magic.py: $(SRC_DIR)/scripts/magic-gen.py $(SRC_DIR)/criu/include/magic.h + $(call msg-gen, $@) $(Q) python $^ $@ -pb.py: protobuf +pb.py: images $(Q) echo "# Autogenerated. Do not edit!" > $@ $(Q) for m in $(proto-py-modules); do \ echo "from $$m import *" >> $@ ;\ |