SUBDIRS = daemon lib
PREFIX = /usr/local
VERSION = 0.9.2

all:
	@echo "if compiling on an SGI computer, 'make irix', then 'make install'"
	@echo "otherwise, cd into the lib subdirectory and make"

irix install clean distclean realclean:
	for i in $(SUBDIRS); do (cd $$i; $(MAKE) PREFIX=$(PREFIX) $@); done

dist:
	$(MAKE) distclean
	-/bin/rm -f autostereo.* autostereo-\*
	cd .. ; ln -f -s autostereo autostereo-$(VERSION)
	(cd .. ; find autostereo-$(VERSION) -name RCS -prune -o -follow -type f -print | /usr/freeware/bin/tar -c -T -) > /usr/tmp/autostereo.tar
	/bin/mv /usr/tmp/autostereo.tar autostereo-$(VERSION).tar
	/usr/sbin/gzip autostereo-$(VERSION).tar
	/bin/rm -f ../autostereo-$(VERSION)
