Fixed object filename clash
[SXSI/TextCollection.git] / makefile
1 CC = g++
2 LIBCDSPATH = ../libcds
3 CPPFLAGS = -Wall -ansi -g -I$(LIBCDSPATH)/includes/ -O3 -DNDEBUG
4 LIBCDSA = $(LIBCDSPATH)/lib/libcds.a
5 LIBRLCSA = incbwt/rlcsa.a
6 LIBLZTRIE = lzindex/lztrie.a
7 LIBSWCSA = swcsa/swcsa.a
8
9 dcover_obs = dcover/difference_cover.o
10
11 TextCollection_obs = TextCollection.o TextCollectionBuilder.o FMIndexBuilder.o FMIndex.o Tools.o \
12                      TextStorage.o ${LIBRLCSA} ${LIBCDSA} ${LIBLZTRIE} ${LIBSWCSA}
13 TCDebug_obs =  bittree.o rbtree.o dynFMI.o 
14
15 all: testTextCollection
16
17 testTextCollection: testTextCollection.o $(TextCollection_obs) $(TCDebug_obs) HeapProfiler.o
18         $(CC) -o testTextCollection testTextCollection.o $(TextCollection_obs) $(TCDebug_obs) HeapProfiler.o
19
20 timeTextCollection: timeTextCollection.o $(TextCollection_obs) $(TCDebug_obs)
21         $(CC) -o timeTextCollection timeTextCollection.o $(TextCollection_obs) $(TCDebug_obs)
22
23 test2dRange: test2dRange.o ${LIBCDSA}
24         $(CC) -o test2dRange test2dRange.o ${LIBCDSA}
25
26 incbwt/rlcsa.a:
27         @make -C incbwt
28
29 lzindex/lztrie.a:
30         @make -C lzindex
31
32 swcsa/swcsa.a:
33         @make -C swcsa
34
35 clean:
36         @make clean -C incbwt
37         @make clean -C lzindex
38         @make clean -C swcsa
39         rm -f core *.o *~ testTextCollection timeTextCollection dcover/*.o dcover/*~
40
41 shallow_clean:
42         rm -f core *.o *~ testTextCollection timeTextCollection
43
44 depend:
45         @make depend -C incbwt
46         $(CC) -MM *.cpp > dependencies.mk
47
48 include dependencies.mk