Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Safonov <dsafonov@virtuozzo.com>2016-04-29 22:47:00 +0300
committerAndrei Vagin <avagin@virtuozzo.com>2017-03-14 21:03:22 +0300
commit427f68f0a3033d608e44cadb6e21799ce456293c (patch)
tree2fc21e03fee52bbed705b365736e90eefe0fbfec /compel/Makefile
parent4bccd6a6bc0e0787b120a124324162ea85612493 (diff)
compel: shuffle skeleton a bit
I propose to change compel directory structure: - if we want support more arch's than x86/ppc66, it seems worth to add arch/ folder - move all sources from src/ folder up - to have headers and build additional object with CFLAGS for a symlink seems for me less hacky way than mess around with .c files cross-linking - I made handle-elf.h header for arch helpers code. I may named that just "elf.h", but that may confuse, as there are <elf.h> system header - I would like to drop those ELF_PPC64/ELF_X86_32/ELF_X86_64 defines and use CONFIG_X86_64 and whatnot After this patch compel directory become: compel/ ├── arch │ ├── ppc64 │ │ └── include │ │ └── handle-elf.h │ └── x86 │ └── include │ └── handle-elf.h ├── handle-elf-32.c -> handle-elf.c ├── handle-elf.c ├── include │ ├── piegen.h │ └── uapi │ ├── elf32-types.h │ ├── elf64-types.h │ └── types.h ├── main.c └── Makefile Note: temporary I make value32 and addend32 for compilation on arm/aarch64 Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Diffstat (limited to 'compel/Makefile')
-rw-r--r--compel/Makefile22
1 files changed, 15 insertions, 7 deletions
diff --git a/compel/Makefile b/compel/Makefile
index 5e4bd7b76..d08e470df 100644
--- a/compel/Makefile
+++ b/compel/Makefile
@@ -2,6 +2,7 @@ include $(SRC_DIR)/Makefile.versions
ccflags-y += -iquote criu/include
ccflags-y += -iquote compel/include
+ccflags-y += -iquote compel/arch/$(ARCH)/include
ccflags-y += -DCOMPEL_VERSION=\"$(COMPEL_SO_VERSION_MAJOR).$(COMPEL_SO_VERSION_MINOR)\"
host-ccflags-y += $(filter-out -pg $(CFLAGS-GCOV),$(ccflags-y))
@@ -9,12 +10,19 @@ HOSTCFLAGS += $(filter-out -pg $(CFLAGS-GCOV),$(WARNINGS) $(DEFINES))
HOSTLDFLAGS += $(filter-out -pg $(CFLAGS-GCOV),$(LDFLAGS))
hostprogs-y += compel
-compel-objs += src/main.o
+compel-objs += main.o
+compel-objs += handle-elf.o
-ifneq ($(filter ia32 x86, $(ARCH)),)
-compel-objs += src/elf-x86-32.o
-compel-objs += src/elf-x86-64.o
-endif
-ifeq ($(SRCARCH),ppc64)
-compel-objs += src/elf-ppc64.o
+# Add $(DEFINES) to CFLAGS of compel-objs.
+# We can't do ccflags-y += $(DEFINES)
+# as we need to build handle-elf-32.o
+# with -DCONFIG_X86_32
+define ccflags-defines
+ HOSTCFLAGS_$(1) += $(DEFINES)
+endef
+$(eval $(call map,ccflags-defines,$(compel-objs)))
+
+ifeq ($(ARCH),x86)
+ compel-objs += handle-elf-32.o
+ HOSTCFLAGS_handle-elf-32.o += -DCONFIG_X86_32
endif