[CRIU] [PATCH v5 5/5] make: insert Makefile.inc into Makefile

Kinsbursky Stanislav skinsbursky at openvz.org
Wed Nov 21 07:51:07 EST 2012


From: Stanislav Kinsbursky <skinsbursky at openvz.org>

Makefile.inc is included only into Makefile now. So let's insert it's content
into Makefile itself.

Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
---
 Makefile     |   76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 Makefile.inc |   75 ---------------------------------------------------------
 2 files changed, 75 insertions(+), 76 deletions(-)
 delete mode 100644 Makefile.inc
-------------- next part --------------
diff --git a/Makefile b/Makefile
index e425858..9c1fef9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,78 @@
-include Makefile.inc
+#
+# Common definitions
+#
+
+ifeq ($(strip $(V)),)
+	E = @echo
+	Q = @
+else
+	E = @\#
+	Q =
+endif
+
+FIND		:= find
+CSCOPE		:= cscope
+TAGS		:= ctags
+RM		:= rm
+LD		:= ld
+HEXDUMP		:= hexdump
+CC		:= gcc
+ECHO		:= echo
+NM		:= nm
+AWK		:= awk
+SH		:= sh
+MAKE		:= make
+
+# Additional ARCH settings for x86
+ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+                  -e s/arm.*/arm/ -e s/sa110/arm/ \
+                  -e s/s390x/s390/ -e s/parisc64/parisc/ \
+                  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
+                  -e s/sh[234].*/sh/ )
+
+uname_M      := $(shell uname -m | sed -e s/i.86/i386/)
+ifeq ($(uname_M),i386)
+	ARCH         := x86
+	DEFINES      := -DCONFIG_X86_32
+endif
+ifeq ($(uname_M),x86_64)
+	ARCH         := x86
+	DEFINES      := -DCONFIG_X86_64
+endif
+
+SRC_DIR		?= $(shell pwd)
+
+CFLAGS		= -I$(SRC_DIR)/include -fno-strict-aliasing
+
+LIBS		:= -lrt -lpthread -lprotobuf-c
+
+DEFINES		+= -D_FILE_OFFSET_BITS=64
+DEFINES		+= -D_GNU_SOURCE
+
+WARNINGS	:= -Wall
+
+ifneq ($(WERROR),0)
+	WARNINGS += -Werror
+endif
+
+ifeq ($(DEBUG),1)
+	DEFINES += -DCR_DEBUG
+endif
+
+ifeq ($(DEBUG),1)
+	DEFINES += -DCR_DEBUG
+	CFLAGS	+= -O0 -ggdb3
+else
+	CFLAGS	+= -O2
+endif
+
+CFLAGS		+= $(WARNINGS) $(DEFINES)
+MAKEFLAGS	:= --no-print-directory
+SYSCALL-LIB	= $(SRC_DIR)/arch/$(ARCH)/syscalls.o
+PROTOBUF-LIB	= $(SRC_DIR)/protobuf/protobuf-lib.o
+
+export E Q CC ECHO MAKE CFLAGS LIBS ARCH DEFINES MAKEFLAGS SRC_DIR SYSCALL-LIB SH
+
 
 PROGRAM		:= crtools
 
diff --git a/Makefile.inc b/Makefile.inc
deleted file mode 100644
index 2b34197..0000000
--- a/Makefile.inc
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Common definitions
-#
-
-ifeq ($(strip $(V)),)
-	E = @echo
-	Q = @
-else
-	E = @\#
-	Q =
-endif
-
-FIND		:= find
-CSCOPE		:= cscope
-TAGS		:= ctags
-RM		:= rm
-LD		:= ld
-HEXDUMP		:= hexdump
-CC		:= gcc
-ECHO		:= echo
-NM		:= nm
-AWK		:= awk
-SH		:= sh
-MAKE		:= make
-
-# Additional ARCH settings for x86
-ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-                  -e s/arm.*/arm/ -e s/sa110/arm/ \
-                  -e s/s390x/s390/ -e s/parisc64/parisc/ \
-                  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-                  -e s/sh[234].*/sh/ )
-
-uname_M      := $(shell uname -m | sed -e s/i.86/i386/)
-ifeq ($(uname_M),i386)
-	ARCH         := x86
-	DEFINES      := -DCONFIG_X86_32
-endif
-ifeq ($(uname_M),x86_64)
-	ARCH         := x86
-	DEFINES      := -DCONFIG_X86_64
-endif
-
-SRC_DIR		?= $(shell pwd)
-
-CFLAGS		= -I$(SRC_DIR)/include -fno-strict-aliasing
-
-LIBS		:= -lrt -lpthread -lprotobuf-c
-
-DEFINES		+= -D_FILE_OFFSET_BITS=64
-DEFINES		+= -D_GNU_SOURCE
-
-WARNINGS	:= -Wall
-
-ifneq ($(WERROR),0)
-	WARNINGS += -Werror
-endif
-
-ifeq ($(DEBUG),1)
-	DEFINES += -DCR_DEBUG
-endif
-
-ifeq ($(DEBUG),1)
-	DEFINES += -DCR_DEBUG
-	CFLAGS	+= -O0 -ggdb3
-else
-	CFLAGS	+= -O2
-endif
-
-CFLAGS		+= $(WARNINGS) $(DEFINES)
-MAKEFLAGS	:= --no-print-directory
-SYSCALL-LIB	= $(SRC_DIR)/arch/$(ARCH)/syscalls.o
-PROTOBUF-LIB	= $(SRC_DIR)/protobuf/protobuf-lib.o
-
-export E Q CC ECHO MAKE CFLAGS LIBS ARCH DEFINES MAKEFLAGS SRC_DIR SYSCALL-LIB SH
-


More information about the CRIU mailing list