mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
make: Move common definitions to Makefile.inc
To eliminate code duplication. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
de78c6db55
commit
d88eebc9e0
27
Makefile
27
Makefile
@@ -1,34 +1,7 @@
|
|||||||
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
|
||||||
|
31
Makefile.inc
31
Makefile.inc
@@ -1,3 +1,7 @@
|
|||||||
|
#
|
||||||
|
# Common definitions
|
||||||
|
#
|
||||||
|
|
||||||
ifeq ($(strip $(V)),)
|
ifeq ($(strip $(V)),)
|
||||||
E = @echo
|
E = @echo
|
||||||
Q = @
|
Q = @
|
||||||
@@ -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
|
||||||
|
@@ -1,21 +1,4 @@
|
|||||||
-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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user