[CRIU] [PATCH 5/6] make: combine arch-specific options together

Dmitry Safonov dsafonov at virtuozzo.com
Mon Apr 24 11:37:18 PDT 2017


DEFINES, LDARCH, VDSO in one place - visually simpler, more terse.

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 Makefile | 35 ++++++++++++-----------------------
 1 file changed, 12 insertions(+), 23 deletions(-)

diff --git a/Makefile b/Makefile
index f568e50545c0..40bf4c01d16b 100644
--- a/Makefile
+++ b/Makefile
@@ -35,24 +35,6 @@ endif
 
 #
 # Architecture specific options.
-ifeq ($(ARCH),x86)
-        LDARCH		:= i386:x86-64
-        VDSO		:= y
-endif
-
-ifeq ($(ARCH),aarch64)
-        VDSO		:= y
-endif
-
-ifeq ($(ARCH),ppc64)
-        LDARCH		:= powerpc:common64
-        VDSO		:= y
-endif
-
-LDARCH ?= $(SRCARCH)
-
-export LDARCH VDSO
-
 ifeq ($(ARCH),arm)
         ARMV		:= $(shell echo $(UNAME-M) | sed -nr 's/armv([[:digit:]]).*/\1/p; t; i7')
         DEFINES		:= -DCONFIG_ARMV$(ARMV)
@@ -69,17 +51,24 @@ ifeq ($(ARCH),arm)
 endif
 
 ifeq ($(ARCH),aarch64)
-	DEFINES		:= -DCONFIG_AARCH64
-endif
-
-ifeq ($(ARCH),x86)
-        DEFINES		:= -DCONFIG_X86_64
+        VDSO		:= y
+        DEFINES		:= -DCONFIG_AARCH64
 endif
 
 ifeq ($(ARCH),ppc64)
+        LDARCH		:= powerpc:common64
+        VDSO		:= y
         DEFINES		:= -DCONFIG_PPC64 -D__SANE_USERSPACE_TYPES__
 endif
 
+ifeq ($(ARCH),x86)
+        LDARCH		:= i386:x86-64
+        VDSO		:= y
+        DEFINES		:= -DCONFIG_X86_64
+endif
+
+LDARCH ?= $(SRCARCH)
+export LDARCH VDSO
 export PROTOUFIX DEFINES USERCFLAGS
 
 #
-- 
2.12.2



More information about the CRIU mailing list