# Copyright 1989 by Norman Ramsey, Odyssey Research Associates
# Not to be sold, but may be used freely for any purpose
# For more information, see file COPYRIGHT in the parent directory

# This is a SUN OS 4 Makefile.  Sorry.  Makefiles in subdirectories
# should work under any reasonable Make.

MAKE=make $(MFLAGS)
DIRECTORIES=68k ada awk c c++ dijkstra kelem larch nawk \
	    penelope postscript reduce sml ssl turing turing+

# Removes excess junk from the world, except it doesn't remove
# common object files from ./master
# This destroys the sources, so don't make clean until you've made boot.
clean:
	@for i in $(DIRECTORIES); do \
		cd $$i; \
		echo making $$i clean...; \
		$(MAKE) clean ; \
		cd ..; \
	done
	rm -f *~
	@echo "All done."

# This creates the minimum sources in preparation for `make distribution'
source:
	cd c ; $(MAKE) source ; cd ..
	cd awk ; $(MAKE) source ; cd ..

# Used to bring up the system when first installing it.  Requires sources,
# either from the distribution tarfile or from `make source'
boot:
	cd c; $(MAKE) boot; cd ..
	cd awk; $(MAKE) boot; cd ..

# Make all known webs.  For lunatics only.
all:
	@for i in $(DIRECTORIES); do \
		cd $$i; \
		$(MAKE) web ; \
		cd ..; \
	done
	@echo "All done."