+all: $(TEXTCOLLECTION_A)
+
+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) $(LIBS) $(TCDebug_obs)
+ $(CC) -o timeTextCollection timeTextCollection.o $(TextCollection_obs) $(TCDebug_obs)
+
+test2dRange: test2dRange.o ${LIBCDSA}
+ $(CC) -o test2dRange test2dRange.o ${LIBCDSA}
+
+incbwt/rlcsa.a:
+ @make -C incbwt
+
+lzindex/lztrie.a:
+ @make -C lzindex
+
+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