Commit d88eebc9 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

make: Move common definitions to Makefile.inc

To eliminate code duplication.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent de78c6db
include Makefile.inc include Makefile.inc
CFLAGS += -I./include -fno-strict-aliasing
LIBS += -lrt -lpthread -lprotobuf-c
DEFINES += -D_FILE_OFFSET_BITS=64
DEFINES += -D_GNU_SOURCE
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
WARNINGS += -Wall
CFLAGS += $(WARNINGS) $(DEFINES)
PROGRAM := crtools PROGRAM := crtools
export CC ECHO MAKE CFLAGS LIBS ARCH DEFINES
OBJS += parasite-syscall.o OBJS += parasite-syscall.o
OBJS += cr-restore.o OBJS += cr-restore.o
OBJS += crtools.o OBJS += crtools.o
......
#
# Common definitions
#
ifeq ($(strip $(V)),) ifeq ($(strip $(V)),)
E = @echo E = @echo
Q = @ Q = @
...@@ -38,3 +42,30 @@ ifeq ($(uname_M),x86_64) ...@@ -38,3 +42,30 @@ ifeq ($(uname_M),x86_64)
endif endif
no-deps-targets := tags cscope clean cleanout cleandep realclean no-deps-targets := tags cscope clean cleanout cleandep realclean
CFLAGS += -I./include -fno-strict-aliasing
LIBS += -lrt -lpthread -lprotobuf-c
DEFINES += -D_FILE_OFFSET_BITS=64
DEFINES += -D_GNU_SOURCE
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
WARNINGS += -Wall
CFLAGS += $(WARNINGS) $(DEFINES)
export CC ECHO MAKE CFLAGS LIBS ARCH DEFINES
-include ../Makefile.inc include ../Makefile.inc
CFLAGS += -I./include
CFLAGS += -O0 -ggdb3
DEFINES += -D_FILE_OFFSET_BITS=64
DEFINES += -D_GNU_SOURCE
ifneq ($(WERROR),0)
WARNINGS += -Werror
endif
ifeq ($(DEBUG),1)
DEFINES += -DCR_DEBUG
endif
WARNINGS += -Wall
CFLAGS += $(WARNINGS) $(DEFINES)
LIBRARY := protobuf-lib.o LIBRARY := protobuf-lib.o
......
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