From: Kim Nguyễn Date: Thu, 29 Mar 2012 12:04:34 +0000 (+0200) Subject: Split debugging and profiling mode. X-Git-Url: http://git.nguyen.vg/gitweb/?p=SXSI%2FXMLTree.git;a=commitdiff_plain;h=03125db103d98200f7a313a38db54c56748283d1 Split debugging and profiling mode. --- diff --git a/Makefile b/Makefile index 03d3fdb..36637de 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,17 @@ endif ifeq ($(DEBUG), true) OPT_FLAGS=-O0 -g $(POPCOUNT_FLAG) -static else - OPT_FLAGS=-O4 $(POPCOUNT_FLAG) -static + OPT_FLAGS=-O4 $(POPCOUNT_FLAG) -static -flto endif -CXXFLAGS=-std=c++0x $(INC_FLAGS) $(OPT_FLAGS) +ifeq ($(PROFILE), true) + PROF_FLAGS=-pg -g +else + PROF_FLAGS= +endif + + +CXXFLAGS=-std=c++0x $(INC_FLAGS) $(OPT_FLAGS) $(PROF_FLAGS) CXX=g++ OBJECTS_XMLTREE=XMLTree.o XMLTreeBuilder.o