X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=makefile;h=92d83d8822277decdac67848241e9683d6dd6ece;hb=72aa11ca7df7975f650344e8904a1a690be2480e;hp=8c88467a2348458d972a8d54706369fe87d3fbcf;hpb=46d3fee70e7e9576c4cc8af46cd66c1c8eceb1e9;p=SXSI%2FTextCollection.git diff --git a/makefile b/makefile index 8c88467..92d83d8 100644 --- a/makefile +++ b/makefile @@ -1,24 +1,28 @@ +HIDE=@ CC = g++ LIBCDSPATH = ../libcds -CPPFLAGS = -Wall -ansi -g -I$(LIBCDSPATH)/includes/ -O3 -DNDEBUG +CPPFLAGS = -Wall -ansi -g -I$(LIBCDSPATH)/includes/ -O3 -DNDEBUG -Wno-deprecated-declarations #CPPFLAGS = -Wall -ansi -g -I$(LIBCDSPATH)/includes/ LIBCDSA = $(LIBCDSPATH)/lib/libcds.a LIBRLCSA = incbwt/rlcsa.a LIBLZTRIE = lzindex/lztrie.a LIBSWCSA = swcsa/swcsa.a +LIBS= ${LIBRLCSA} ${LIBCDSA} ${LIBLZTRIE} ${LIBSWCSA} dcover_obs = dcover/difference_cover.o TextCollection_obs = TextCollection.o TextCollectionBuilder.o FMIndexBuilder.o RLCSABuilder.o FMIndex.o Tools.o \ - TextStorage.o Query.o EditDistance.o ResultSet.o ${LIBRLCSA} ${LIBCDSA} ${LIBLZTRIE} ${LIBSWCSA} + TextStorage.o Query.o EditDistance.o ResultSet.o TCDebug_obs = bittree.o rbtree.o dynFMI.o +TEXTCOLLECTION_A=libTextCollection.a + all: testTextCollection -testTextCollection: testTextCollection.o $(TextCollection_obs) $(TCDebug_obs) HeapProfiler.o - $(CC) -o testTextCollection testTextCollection.o $(TextCollection_obs) $(TCDebug_obs) HeapProfiler.o +testTextCollection: testTextCollection.o $(TextCollection_obs) $(LIBS) $(TCDebug_obs) HeapProfiler.o + $(CC) -o testTextCollection testTextCollection.o $(TextCollection_obs) $(LIBS) $(TCDebug_obs) HeapProfiler.o -timeTextCollection: timeTextCollection.o $(TextCollection_obs) $(TCDebug_obs) +timeTextCollection: timeTextCollection.o $(TextCollection_obs) $(LIBS) $(TCDebug_obs) $(CC) -o timeTextCollection timeTextCollection.o $(TextCollection_obs) $(TCDebug_obs) test2dRange: test2dRange.o ${LIBCDSA} @@ -33,6 +37,24 @@ lzindex/lztrie.a: swcsa/swcsa.a: @make -C swcsa +%o: %c + @echo [C] $@ + $(HIDE) (gcc -c $(CPPFLAGS) $< -o $@ + +%o: %cpp + @echo [C++] $@ + $(HIDE) $(CC) -c $(CPPFLAGS) $< -o $@ + + +$(TEXTCOLLECTION_A): $(TextCollection_obs) $(LIBS) + @echo [Link] $@ + $(HIDE) rm -rf .objs + $(HIDE) mkdir .objs + $(HIDE) (cd .objs; ar x ../${LIBRLCSA};ar x ../${LIBLZTRIE}; ar x ../${LIBSWCSA}) + $(HIDE) ar rcs $@ $(TextCollection_obs) .objs/*.o +# $(HIDE) rm -rf .objs + + clean: @make clean -C incbwt @make clean -C lzindex