criu/compel/Makefile
Cyrill Gorcunov c7a717c1d1 compel: Save and restore regs inside compel by default
CRIU keeps all registers on CoreEntry and makes sigframe from
them as well, which means anyone using the compel library
have to provide own handlers, which is inconvenient. So
now it's possible to leave this task for libcompel itself:
it will save the regs and prerare sigframe on its own.

travis-ci: success for compel: Contrinue improving library
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:11 +03:00

54 lines
1.6 KiB
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 += -fno-strict-aliasing
ccflags-y += -fPIC
#
# UAPI inclusion, referred as <compel/...>
ccflags-y += -I compel/include/uapi
ccflags-y += -I compel/plugins/include/uapi
lib-name := libcompel.a
lib-y += src/lib/log.o
host-lib-y += src/lib/log.o
lib-y += arch/$(ARCH)/src/lib/cpu.o
lib-y += arch/$(ARCH)/src/lib/infect.o
lib-y += src/lib/infect-rpc.o
lib-y += src/lib/infect-util.o
lib-y += src/lib/infect.o
lib-y += src/lib/ptrace.o
ifeq ($(ARCH),x86)
obj-y += src/lib/handle-elf-32.o
endif
obj-y += src/main.o
obj-y += arch/$(ARCH)/src/lib/handle-elf.o
obj-y += src/lib/handle-elf.o
ifeq ($(ARCH),x86)
CFLAGS_handle-elf-32.o += -UCONFIG_X86_64 -DCONFIG_X86_32
CFLAGS_handle-elf-32.d += -UCONFIG_X86_64 -DCONFIG_X86_32
endif
host-ccflags-y += $(ccflags-y)
hostprogs-y += compel-host
compel-host-objs := $(patsubst %.o,%-host.o,$(obj-y) $(host-lib-y))
ifeq ($(ARCH),x86)
HOSTCFLAGS_handle-elf-32-host.o += -UCONFIG_X86_64 -DCONFIG_X86_32
HOSTCFLAGS_handle-elf-32-host.d += -UCONFIG_X86_64 -DCONFIG_X86_32
endif
cleanup-y += compel/compel
cleanup-y += compel/compel-host
cleanup-y += compel/libcompel.so