bin_PROGRAMS=ra-index ra-merge ra-retrieve

ra_index_SOURCES=imain.c index.c
ra_index_LDADD=-lsavantio -ltemplate -lsavutil -ldate -lm
ra_index_LDFLAGS=-L$(top_builddir)/savutil -L$(top_builddir)/wordvec \
	-L$(top_builddir)/savutil/parsedate -L$(top_builddir)/template
ra_index_DEPENDENCIES=$(top_builddir)/savutil/libsavutil.a \
	$(top_builddir)/savutil/parsedate/libdate.a \
	$(top_builddir)/template/libtemplate.a \
	$(top_builddir)/wordvec/libsavantio.a 

ra_merge_SOURCES=mmain.c
ra_merge_LDADD=-lsavantio -ltemplate -lsavutil -ldate -lm
ra_merge_LDFLAGS=-L$(top_builddir)/savutil -L$(top_builddir)/wordvec \
	-L$(top_builddir)/savutil/parsedate -L$(top_builddir)/template
ra_merge_DEPENDENCIES=$(top_builddir)/savutil/libsavutil.a \
	$(top_builddir)/savutil/parsedate/libdate.a \
	$(top_builddir)/template/libtemplate.a \
	$(top_builddir)/wordvec/libsavantio.a 

ra_retrieve_SOURCES=rmain.c retrieve.c
ra_retrieve_LDADD=-lsavantio -ltemplate -lsavutil -ldate -lm
ra_retrieve_LDFLAGS=-L$(top_builddir)/savutil -L$(top_builddir)/wordvec \
	-L$(top_builddir)/savutil/parsedate -L$(top_builddir)/template 
ra_retrieve_DEPENDENCIES=$(top_builddir)/savutil/libsavutil.a \
	$(top_builddir)/savutil/parsedate/libdate.a \
	$(top_builddir)/template/libtemplate.a \
	$(top_builddir)/wordvec/libsavantio.a 

EXTRA_DIST=main.h

$(top_builddir)/savutil/parsedate/libdate.a:
	cd $(top_builddir)/savutil/parsedate; make libdate.a

$(top_builddir)/savutil/libsavutil.a:
	cd $(top_builddir)/savutil; make libsavutil.a

$(top_builddir)/template/libtemplate.a:
	cd $(top_builddir)/template; make libtemplate.a

$(top_builddir)/wordvec/libsavantio.a:
	cd $(top_builddir)/wordvec; make libsavantio.a

