#
include makefile.dep

bin_source_dirs = grid vecplot profstat util \
	adcp/adcpsect adcp/edit adcp/cal adcp/scanload \
	adcp/ping2mat adcp/util adcp/nav \
	adcp/tran_bbp adcp/tran_nbp \
	ctd/load ctd/util \
	ocean/cmd

lib_source_dirs = dbsource use_db ioserv ioserv/main \
	matlab ocean vector vstat \
	adcp/use_adcp

all:	libs bins

bins:	$(bin_source_dirs)
$(bin_source_dirs): bin.tmp
	echo $@
	$(CD) $@ ;	$(MAKE) $(CLEAN)
	$(RM) bin.tmp
	echo "$(MAKE) $(CLEAN)" > bin.tmp

libs:	$(lib_source_dirs)
$(lib_source_dirs): lib.tmp
	echo $@
	$(PERL) make/listobj.prl $@
	$(CD) $@ ;	$(MAKE) $(CLEAN)
	$(RM) lib.tmp
	echo "$(MAKE) $(CLEAN)" > lib.tmp

bin.tmp lib.tmp:
	echo $@
	touch $@

clean:
	$(MAKE) CLEAN=clean

