...
[SXSI/XMLTree.git] / makefile
index a3b0e61..bf21063 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,13 +1,19 @@
-FLAGS = -O9 -I./libcds/includes/\r
+FLAGS =-std=c++0x -O3 -I./libcds/includes/\r
 \r
-OBJECTS=libcds/lib/libcds.a\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  \r
+OBJECTS_TCA=TextCollection/incbwt/rlcsa.a\r
 \r
-all: text_collection XMLTree\r
 \r
-XMLTree: XMLTree.o bp.o darray.o bpcore.o libcds/lib/libcds.a\r
-       cp libcds/lib/libcds.a XMLTree.a\r
-       ar vrcs XMLTree.a XMLTree.o bp.o darray.o bpcore.o\r
+all: libcds text_collection XMLTree\r
 \r
+XMLTree: XMLTree.o bp.o darray.o bpcore.o $(LIBCDS_A) $(OBJECTS_TCO) $(OBJECTS_TCA)\r
+       cp libcds/lib/libcds.a XMLTree.a\r
+       rm -rf .objs\r
+       mkdir .objs\r
+       cd .objs; ar x ../$(OBJECTS_TCA)\r
+       ar rvcs XMLTree.a XMLTree.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\r
        g++ $(FLAGS) -c XMLTree.cpp\r
@@ -24,5 +30,8 @@ bpcore.o: bpcore.c
 text_collection:\r
        make -C TextCollection/\r
 \r
+libcds:\r
+       make -C libcds/\r
+\r
 clean:\r
-       rm -f *.o 
\ No newline at end of file
+       rm -f *.[oa]\r