[CRIU] [PATCH 5/5] make: Build crtools with -O2 by default

Cyrill Gorcunov gorcunov at openvz.org
Sat Jul 28 08:13:33 EDT 2012


Enable debugging only if DEBUG=1 provided.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 3cb51a0..6acb0b8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,6 @@
 include Makefile.inc
 
 CFLAGS		+= -I./include
-CFLAGS		+= -O0 -ggdb3
 
 LIBS		+= -lrt -lpthread -lprotobuf-c
 
@@ -14,6 +13,9 @@ endif
 
 ifeq ($(DEBUG),1)
 	DEFINES += -DCR_DEBUG
+	CFLAGS	+= -O0 -ggdb3
+else
+	CFLAGS	+= -O2
 endif
 
 WARNINGS	+= -Wall
-- 
1.7.7.6



More information about the CRIU mailing list