[CRIU] [PATCH 2/2] make: Build crtools with -O2 by default
Cyrill Gorcunov
gorcunov at openvz.org
Tue Jul 31 08:04:01 EDT 2012
Enable debugging only if DEBUG=1 provided.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
Makefile | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 597f767..5f94bbc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,6 @@
include Makefile.inc
-CFLAGS += -I./include
-CFLAGS += -O0 -ggdb3 -fno-strict-aliasing
+CFLAGS += -I./include -fno-strict-aliasing
LIBS += -lrt -lpthread -lprotobuf-c
@@ -16,6 +15,13 @@ 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)
--
1.7.7.6
More information about the CRIU
mailing list