mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-20 16:51:37 +00:00
Here we rather suffle source code into directories
preparing ground for future work.
Basically all this files movements should end up in the
following compel/ tree structure
compel/
├── arch
│ ├── aarch64
│ │ ├── plugins
│ │ │ └── std
│ │ └── src
│ │ └── lib
│ ├── arm
...
│ ├── ppc64
...
│ └── x86
...
This is architectural part, where each arch consists of
plugins/, and src/. src/ stands for code needed by compel
cli + lib
├── include
│ ├── compiler.h -> ../../criu/include/compiler.h
│ ├── elf32-types.h
│ ├── elf64-types.h
│ ├── int.h -> ../../criu/include/asm-generic/int.h
│ ├── piegen.h
│ ├── shmem.h
│ └── uapi
│ ├── compel.h
│ └── plugins.h
Common includes + uapi
├── plugins
│ ├── fds
│ ├── shmem
│ └── std
Plugins source code
└── src
├── lib
│ ├── handle-elf-32.c -> handle-elf.c
│ ├── handle-elf-32-host.c -> handle-elf-32.c
│ ├── handle-elf.c
│ └── handle-elf-host.c -> handle-elf.c
compel library
├── main.c
├── main-host.c -> main.c
compel cli
└── shared
└── fds.c
shared code between plugins and compel cli
Note: cross-compile won't work for a while.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
23 lines
896 B
Makefile
23 lines
896 B
Makefile
include $(SRC_DIR)/Makefile.versions
|
|
|
|
.PHONY: .FORCE
|
|
|
|
COMPEL_SO_VERSION := $(COMPEL_SO_VERSION_MAJOR)$(if $(COMPEL_SO_VERSION_MINOR),.$(COMPEL_SO_VERSION_MINOR))$(if $(COMPEL_SO_VERSION_SUBLEVEL),.$(COMPEL_SO_VERSION_SUBLEVEL))
|
|
COMPEL_SO_VERSION_CODE := $(shell expr $(COMPEL_SO_VERSION_MAJOR) \* 65536 \+ $(COMPEL_SO_VERSION_MINOR) \* 256 \+ $(COMPEL_SO_VERSION_SUBLEVEL))
|
|
ccflags-y += -iquote compel/arch/$(ARCH)/src/lib/include
|
|
ccflags-y += -iquote compel/include
|
|
ccflags-y += -iquote compel/plugins/include
|
|
ccflags-y += -iquote $(SRC_DIR)/criu/include
|
|
ccflags-y += -fPIC
|
|
|
|
lib-y += arch/$(ARCH)/src/lib/handle-elf.o
|
|
lib-y += src/lib/handle-elf.o
|
|
lib-y += src/lib/handle-elf-32.o
|
|
|
|
obj-y += src/main.o
|
|
|
|
CFLAGS_handle-elf-32.o += -UCONFIG_X86_64 -DCONFIG_X86_32
|
|
CFLAGS_handle-elf-32.d += -UCONFIG_X86_64 -DCONFIG_X86_32
|
|
|
|
cleanup-y += compel/compel
|
|
cleanup-y += compel/libcompel.so
|