Commit a519e0c8 authored by Stanislav Kinsbursky's avatar Stanislav Kinsbursky Committed by Pavel Emelyanov

make: insert Makefile.inc into Makefile

Makefile.inc is included only into Makefile now. So let's insert it's content
into Makefile itself.
Signed-off-by: 's avatarStanislav Kinsbursky <skinsbursky@openvz.org>
Looks-good-to: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 712058a3
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 PROGRAM := crtools
......
#
# 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment