SUBDIRS=savutil template wordvec collection

lib_LIBRARIES=libsavant-yenta.a

libsavant_yenta_a_SOURCES=
libsavant_yenta_a_SUBLIBS=savutil/libsavutil.a \
	template/libtemplate.a wordvec/libsavantio.a \
	savutil/parsedate/libdate.a \
#savutil/zlib/libz.a \
	collection/libcollection.a

EXTRA_DIST=org_chart savant.h yenta-extern.h

libsavant-yenta.a: $(libsavant_yenta_a_SUBLIBS)
	rm -rf allobjs libsavant-yenta.a
	mkdir allobjs
	cd allobjs; \
	for x in $(libsavant_yenta_a_SUBLIBS); do ar x "../$$x"; done; \
	ar cr ../libsavant-yenta.a *.o
	$(RANLIB) libsavant-yenta.a
	rm -rf allobjs

savutil/libsavutil.a:
	cd savutil; $(MAKE) $(MFLAGS) libsavutil.a

template/libtemplate.a:
	cd template; $(MAKE) $(MFLAGS) libtemplate.a

wordvec/libsavantio.a:
	cd template; $(MAKE) $(MFLAGS) libtemplate.a

savutil/parsedate/libdate.a:
	cd savutil/parsedate; $(MAKE) $(MFLAGS) libdate.a

#savutil/zlib/libz.a:
#	cd savutil/zlib; $(MAKE) $(MFLAGS) libz.a

collection/libcollection.a:
	cd collection; $(MAKE) $(MFLAGS) libcollection.a

pure: all
