[CRIU] [PATCH 17/24] criu Makefiles: use compel includes
Kir Kolyshkin
kir at openvz.org
Sat Dec 17 03:22:10 PST 2016
Instead of hardcoding the path to compel uapi includes,
call compel tool to get one.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
criu/Makefile | 7 ++++++-
criu/Makefile.crtools | 2 +-
criu/arch/aarch64/Makefile | 2 +-
criu/arch/arm/Makefile | 2 +-
criu/arch/ppc64/Makefile | 2 +-
criu/arch/x86/Makefile | 2 +-
criu/pie/Makefile | 2 +-
criu/pie/Makefile.library | 2 +-
8 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/criu/Makefile b/criu/Makefile
index f8e6b82..a9b1e61 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -6,6 +6,11 @@ ARCH_DIR := criu/arch/$(SRCARCH)
PIE_DIR := criu/pie
export ARCH_DIR PIE_DIR
+ifeq ($(filter clean mrproper,$(MAKECMDGOALS)),)
+ COMPEL_UAPI_INCLUDES := $(shell $(COMPEL_BIN) includes)
+ export COMPEL_UAPI_INCLUDES
+endif
+
#
# General flags.
ccflags-y += -fno-strict-aliasing
@@ -17,7 +22,7 @@ ccflags-y += -iquote $(SRC_DIR)/$(ARCH_DIR)
ccflags-y += -iquote $(SRC_DIR)/$(ARCH_DIR)/include
ccflags-y += -iquote $(SRC_DIR)/
ccflags-y += -I/usr/include/libnl3
-ccflags-y += -I compel/include/uapi
+ccflags-y += $(COMPEL_UAPI_INCLUDES)
export ccflags-y
diff --git a/criu/Makefile.crtools b/criu/Makefile.crtools
index fa95058..8188129 100644
--- a/criu/Makefile.crtools
+++ b/criu/Makefile.crtools
@@ -1,5 +1,5 @@
ccflags-y += -iquote criu/$(ARCH)
-ccflags-y += -I compel/include/uapi
+ccflags-y += $(COMPEL_UAPI_INCLUDES)
obj-y += action-scripts.o
obj-y += external.o
diff --git a/criu/arch/aarch64/Makefile b/criu/arch/aarch64/Makefile
index 0b05dd1..7b033e5 100644
--- a/criu/arch/aarch64/Makefile
+++ b/criu/arch/aarch64/Makefile
@@ -3,7 +3,7 @@ builtin-name := crtools.built-in.o
ccflags-y += -iquote $(obj) -iquote $(SRC_DIR)
ccflags-y += -iquote $(obj)/include -iquote $(SRC_DIR)/criu/include
ccflags-y += -iquote $(SRC_DIR)/include
-ccflags-y += -I compel/include/uapi
+ccflags-y += $(COMPEL_UAPI_INCLUDES)
obj-y += cpu.o
obj-y += crtools.o
diff --git a/criu/arch/arm/Makefile b/criu/arch/arm/Makefile
index 719dd49..5e60bac 100644
--- a/criu/arch/arm/Makefile
+++ b/criu/arch/arm/Makefile
@@ -3,7 +3,7 @@ builtin-name := crtools.built-in.o
ccflags-y += -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include
ccflags-y += -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
-ccflags-y += -I compel/include/uapi
+ccflags-y += $(COMPEL_UAPI_INCLUDES)
obj-y += cpu.o
obj-y += crtools.o
diff --git a/criu/arch/ppc64/Makefile b/criu/arch/ppc64/Makefile
index 7f767bb..4859bf0 100644
--- a/criu/arch/ppc64/Makefile
+++ b/criu/arch/ppc64/Makefile
@@ -2,7 +2,7 @@ builtin-name := crtools.built-in.o
ccflags-y += -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include
ccflags-y += -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
-ccflags-y += -I compel/include/uapi
+ccflags-y += $(COMPEL_UAPI_INCLUDES)
obj-y += cpu.o
obj-y += crtools.o
diff --git a/criu/arch/x86/Makefile b/criu/arch/x86/Makefile
index 7217068..1d29cb9 100644
--- a/criu/arch/x86/Makefile
+++ b/criu/arch/x86/Makefile
@@ -2,7 +2,7 @@ builtin-name := crtools.built-in.o
ccflags-y += -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include
ccflags-y += -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
-ccflags-y += -I compel/include/uapi
+ccflags-y += $(COMPEL_UAPI_INCLUDES)
asflags-y += -Wstrict-prototypes -Wa,--noexecstack
asflags-y += -D__ASSEMBLY__ -nostdlib -fomit-frame-pointer
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index 9af9155..4dcc60a 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -28,7 +28,7 @@ CFLAGS += -iquote $(SRC_DIR)/criu/include
CFLAGS += -iquote $(SRC_DIR)/include
CFLAGS += -iquote $(SRC_DIR)
-ccflags-y += -I compel/include/uapi
+ccflags-y += $(COMPEL_UAPI_INCLUDES)
ccflags-y += -DCR_NOGLIBC
ccflags-y += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index 10c7b8a..f1c5f11 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -42,7 +42,7 @@ iquotes += -iquote $(SRC_DIR)/$(ARCH_DIR)/include
iquotes += -iquote $(SRC_DIR) -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
CFLAGS := $(filter-out -pg $(CFLAGS-GCOV),$(CFLAGS)) $(iquotes)
asflags-y := -D__ASSEMBLY__ $(iquotes)
-ccflags-y += -I compel/include/uapi
+ccflags-y += $(COMPEL_UAPI_INCLUDES)
ifeq ($(SRCARCH),arm)
ccflags-y += -marm
--
2.7.4
More information about the CRIU
mailing list