Add some inlining by hand
[SXSI/XMLTree.git] / makefile
index a3b0e61..5caf9dd 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,15 +1,28 @@
-FLAGS = -O9 -I./libcds/includes/\r
+CFLAGS= -O6 -I./libcds/includes/ -fno-PIC -I.\r
+FLAGS= -std=c++0x $(CFLAGS)\r
 \r
-OBJECTS=libcds/lib/libcds.a\r
 \r
-all: text_collection XMLTree\r
+LIBCDS_A=libcds/lib/libcds.a \r
+OBJECTS_TCO= TextCollection/TextCollection.o TextCollection/TextCollectionBuilder.o TextCollection/RLCSABuilder.o \\r
+             TextCollection/FMIndex.o TextCollection/FMIndexBuilder.o TextCollection/Tools.o \\r
+             TextCollection/TextStorage.o TextCollection/Query.o TextCollection/EditDistance.o TextCollection/ResultSet.o\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
+LIBRLCSA_TCA=TextCollection/incbwt/rlcsa.a\r
+LIBLZTRIE_TCA=TextCollection/lzindex/lztrie.a\r
+LIBSWCSA_TCA=TextCollection/swcsa/swcsa.a\r
+\r
+all: libcds text_collection XMLTree\r
 \r
+XMLTree: XMLTree.o XMLTreeBuilder.o bp.o darray.o bpcore.o\\r
+ $(LIBCDS_A) $(OBJECTS_TCO) $(LIBRLCSA_TCA) $(LIBLZTRIE_TCA) $(LIBSWCSA_TCA)\r
+       cp libcds/lib/libcds.a XMLTree.a\r
+       rm -rf .objs\r
+       mkdir .objs\r
+       cd .objs; ar x ../$(LIBRLCSA_TCA); ar x ../$(LIBLZTRIE_TCA); ar x ../$(LIBSWCSA_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\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
@@ -21,8 +34,14 @@ 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
+libcds:\r
+       make -C libcds/\r
+\r
 clean:\r
-       rm -f *.o 
\ No newline at end of file
+       rm -f *.[oa]\r