INSTALL_DIR=please_set_the_INSTALL_DIR_variable_in_the_top_level_makefile_and_run_make_config
DEFAULT_SERVER=localhost

config:
	sed -e "/^INSTALL_DIR=/s;.*;INSTALL_DIR=$(INSTALL_DIR);" -e "/^DEFAULT_SERVER=/s;.*;DEFAULT_SERVER=$(DEFAULT_SERVER);" src/makefile > temp; mv temp src/makefile
	cd src; make config
	sed "/^INSTALL_DIR=/s;.*;INSTALL_DIR=$(INSTALL_DIR);" examples/makefile > temp; mv temp examples/makefile
	cd examples; make config
	sed "/^INSTALL_DIR=/s;.*;INSTALL_DIR=$(INSTALL_DIR);" doc/makefile > temp; mv temp doc/makefile

install:
	-mkdir $(INSTALL_DIR)
	cd src; make install
	cd examples; make install
	cd doc; make install

clean:
	cd src; make clean
	cd examples; make clean

reallyclean:
	cd src; make reallyclean
	cd examples; make reallyclean

distribution:	reallyclean
	cp -a . /tmp/tmu1.3; cd /tmp; (cd tmu1.3; make config); tar czf /tmp/tmu1.3.tar.gz `find tmu1.3 -type f | grep -v RCS`; rm -rf tmu1.3
