Fixed parameters
[SXSI/XMLTree.git] / makefile
index c3a7e94..ada8264 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,17 +1,26 @@
-FLAGS = -O3 -I./libcds/includes/\r
+CFLAGS= -g -O0 -I./libcds/includes/ -I.\r
+FLAGS= -std=c++0x $(CFLAGS)\r
 \r
-OBJECTS=libcds/lib/libcds.a\r
-OBJECTS_TC= TextCollection/BitRank.o TextCollection/dynFMI.o TextCollection/rbtree.o TextCollection/Tools.o TextCollection/bittree.o TextCollection/handle.o TextCollection/CSA.o TextCollection/pos.o TextCollection/TextCollection.o\r
+LIBCDS_A=libcds/lib/libcds.a \r
+OBJECTS_TCO= TextCollection/TextCollection.o TextCollection/TextCollectionBuilder.o TextCollection/TCImplementation.o TextCollection/Tools.o TextCollection/BitRank.o TextCollection/TextStorage.o\r
+\r
+LIBRLCSA_TCA=TextCollection/incbwt/rlcsa.a\r
+LIBLZTRIE_TCA=TextCollection/lzindex/lztrie.a\r
 \r
 \r
 all: libcds text_collection XMLTree\r
 \r
-XMLTree: XMLTree.o bp.o darray.o bpcore.o libcds/lib/libcds.a\r
+XMLTree: XMLTree.o XMLTreeBuilder.o bp.o darray.o bpcore.o\\r
+ $(LIBCDS_A) $(OBJECTS_TCO) $(LIBRLCSA_TCA) $(LIBLZTRIE_TCA)\r
        cp libcds/lib/libcds.a XMLTree.a\r
-       ar vrcs XMLTree.a XMLTree.o bp.o darray.o bpcore.o $(OBJECTS_TC)\r
-\r
-\r
-XMLTree.o: bp.c bp.h bpcore.c XMLTree.cpp XMLTree.h\r
+       rm -rf .objs\r
+       mkdir .objs\r
+       cd .objs; ar x ../$(LIBRLCSA_TCA)\r
+       cd .objs; ar x ../$(LIBLZTRIE_TCA)\r
+       ar rvcs XMLTree.a XMLTree.o XMLTreeBuilder.o  bp.o darray.o bpcore.o $(OBJECTS_TCO) .objs/*.o\r
+       rm -rf .objs\r
+\r
+XMLTree.o: bp.c bp.h bpcore.c XMLTree.cpp XMLTree.h basics.h\r
        g++ $(FLAGS) -c XMLTree.cpp\r
 \r
 bp.o: bp.c bpcore.c darray.c bp.h darray.h\r
@@ -23,6 +32,9 @@ darray.o: darray.c darray.h bpcore.c
 bpcore.o: bpcore.c\r
        g++ $(FLAGS) -c bpcore.c\r
 \r
+XMLTreeBuilder.o: XMLTree.h XMLTreeBuilder.h XMLTreeBuilder.cpp basics.h\r
+       g++ $(FLAGS) -c XMLTreeBuilder.cpp\r
+\r
 text_collection:\r
        make -C TextCollection/\r
 \r
@@ -30,4 +42,4 @@ libcds:
        make -C libcds/\r
 \r
 clean:\r
-       rm -f *.\r
+       rm -f *.[oa]\r