########################################################################
# Make all the comserv executables and default clients
# Customize the Makefiles in each directory for your system.
# You may add other client directories in this directory, and
# add the directory name to the ALL definition.
# The Makefile in each directory should support the following targets:
#	all
#	clean
#	veryclean
#	install

# BINDIR defined with respect to the subdirectories.
BINDIR	= ../bin

ALL	= util comserv clients clients.ucb # cstrigserv clients.cit

all: 	
	for dir in $(ALL) ; do \
		echo build for $$dir ... ; \
		(cd $$dir; make all); \
	done

clean:
	for dir in $(ALL) ; do \
		(cd $$dir; make clean); \
	done

veryclean:
	for dir in $(ALL) ; do \
		(cd $$dir; make veryclean); \
	done

install:
	for dir in $(ALL) ; do \
		(cd $$dir; make BINDIR=$(BINDIR) install); \
	done

tar:
	(pwd=`pwd`; \
	dir=`basename $$pwd` ; \
	cd ..; tar cvf - \
	$$dir/Makefile \
	$$dir/README* \
	$$dir/bin \
	$$dir/*/*.c \
	$$dir/*/*.h \
	$$dir/*/*.doc \
	$$dir/*/Makefile \
	$$dir/*/README* \
	| gzip > /tmp/$$dir.tar.gz )
