Add debugging option to make
[SXSI/XMLTree.git] / Makefile
index 2eb3662..0727f78 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,13 +12,20 @@ else
        HIDE=@
 endif
 
-OPT_FLAGS=-O4 $(POPCOUNT_FLAG) -fno-PIC -static
+ifeq ($(DEBUG), true)
+       OPT_FLAGS=-O0 -g $(POPCOUNT_FLAG) -fno-PIC -static
+else
+       OPT_FLAGS=-O4 $(POPCOUNT_FLAG) -fno-PIC -static
+endif
+
+
+
 INC_FLAGS=-I./libcds/includes/ -I.
 CFLAGS= $(INC_FLAGS) $(OPT_FLAGS)
 CXXFLAGS= -std=c++0x $(INC_FLAGS) $(OPT_FLAGS)
 CC=g++
 
-LIBCDS_A=libcds/lib/libcds.a 
+LIBCDS_A=libcds/lib/libcds.a
 OBJECTS_TCO= TextCollection/TextCollection.o \
              TextCollection/TextCollectionBuilder.o \
              TextCollection/RLCSABuilder.o \