2df1d8b28b8c22d6abfb9f26dc5f3d5e204279e3
[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/FMIndex.o TextCollection/FMIndexBuilder.o TextCollection/Tools.o TextCollection/TextStorage.o\r
6 \r
7 LIBRLCSA_TCA=TextCollection/incbwt/rlcsa.a\r
8 LIBLZTRIE_TCA=TextCollection/lzindex/lztrie.a\r
9 LIBSWCSA_TCA=TextCollection/swcsa/swcsa.a\r
10 \r
11 all: libcds text_collection XMLTree\r
12 \r
13 XMLTree: XMLTree.o XMLTreeBuilder.o bp.o darray.o bpcore.o\\r
14  $(LIBCDS_A) $(OBJECTS_TCO) $(LIBRLCSA_TCA) $(LIBLZTRIE_TCA) $(LIBSWCSA_TCA)\r
15         cp libcds/lib/libcds.a XMLTree.a\r
16         rm -rf .objs\r
17         mkdir .objs\r
18         cd .objs; ar x ../$(LIBRLCSA_TCA); ar x ../$(LIBLZTRIE_TCA); ar x ../$(LIBSWCSA_TCA)\r
19         ar rvcs XMLTree.a XMLTree.o XMLTreeBuilder.o  bp.o darray.o bpcore.o $(OBJECTS_TCO) .objs/*.o\r
20         rm -rf .objs\r
21 \r
22 XMLTree.o: bp.c bp.h bpcore.c XMLTree.cpp XMLTree.h basics.h\r
23         g++ $(FLAGS) -c XMLTree.cpp\r
24 \r
25 bp.o: bp.c bpcore.c darray.c bp.h darray.h\r
26         g++ $(FLAGS) -c bp.c\r
27 \r
28 darray.o: darray.c darray.h bpcore.c\r
29         g++ $(FLAGS) -c darray.c\r
30 \r
31 bpcore.o: bpcore.c\r
32         g++ $(FLAGS) -c bpcore.c\r
33 \r
34 XMLTreeBuilder.o: XMLTree.h XMLTreeBuilder.h XMLTreeBuilder.cpp basics.h\r
35         g++ $(FLAGS) -c XMLTreeBuilder.cpp\r
36 \r
37 text_collection:\r
38         make -C TextCollection/\r
39 \r
40 libcds:\r
41         make -C libcds/\r
42 \r
43 clean:\r
44         rm -f *.[oa]\r