65ca372452ee8365d3b1e16b0f613a266e2a3990
[SXSI/XMLTree.git] / makefile
1 CFLAGS= -g -O0 -I./libcds/includes/ -I.\r
2 FLAGS= -std=c++0x $(CFLAGS)\r
3 \r
4 LIBCDS_A=libcds/lib/libcds.a \r
5 OBJECTS_TCO= TextCollection/TextCollection.o TextCollection/TextCollectionBuilder.o TextCollection/RLCSABuilder.o \\r
6              TextCollection/FMIndex.o TextCollection/FMIndexBuilder.o TextCollection/Tools.o \\r
7              TextCollection/TextStorage.o TextCollection/Query.o TextCollection/EditDistance.o TextCollection/ResultSet.o\r
8 \r
9 LIBRLCSA_TCA=TextCollection/incbwt/rlcsa.a\r
10 LIBLZTRIE_TCA=TextCollection/lzindex/lztrie.a\r
11 LIBSWCSA_TCA=TextCollection/swcsa/swcsa.a\r
12 \r
13 all: libcds text_collection XMLTree\r
14 \r
15 XMLTree: XMLTree.o XMLTreeBuilder.o bp.o darray.o bpcore.o\\r
16  $(LIBCDS_A) $(OBJECTS_TCO) $(LIBRLCSA_TCA) $(LIBLZTRIE_TCA) $(LIBSWCSA_TCA)\r
17         cp libcds/lib/libcds.a XMLTree.a\r
18         rm -rf .objs\r
19         mkdir .objs\r
20         cd .objs; ar x ../$(LIBRLCSA_TCA); ar x ../$(LIBLZTRIE_TCA); ar x ../$(LIBSWCSA_TCA)\r
21         ar rvcs XMLTree.a XMLTree.o XMLTreeBuilder.o  bp.o darray.o bpcore.o $(OBJECTS_TCO) .objs/*.o\r
22         rm -rf .objs\r
23 \r
24 XMLTree.o: bp.c bp.h bpcore.c XMLTree.cpp XMLTree.h basics.h\r
25         g++ $(FLAGS) -c XMLTree.cpp\r
26 \r
27 bp.o: bp.c bpcore.c darray.c bp.h darray.h\r
28         g++ $(FLAGS) -c bp.c\r
29 \r
30 darray.o: darray.c darray.h bpcore.c\r
31         g++ $(FLAGS) -c darray.c\r
32 \r
33 bpcore.o: bpcore.c\r
34         g++ $(FLAGS) -c bpcore.c\r
35 \r
36 XMLTreeBuilder.o: XMLTree.h XMLTreeBuilder.h XMLTreeBuilder.cpp basics.h\r
37         g++ $(FLAGS) -c XMLTreeBuilder.cpp\r
38 \r
39 text_collection:\r
40         make -C TextCollection/\r
41 \r
42 libcds:\r
43         make -C libcds/\r
44 \r
45 clean:\r
46         rm -f *.[oa]\r