## 'make' file to bring up and maintain the Unix V7 (Berkeley 4BSD)
 #  version of the software tools

makecontrol:: rat4

makecontrol:: /usr/tools/lib.a
	touch /usr/tools/src/*.w

makecontrol:: /usr/tools/src/*.w
	recompile $?
	touch makecontrol

#			# Need to boot up rat4
rat4:
#			# First, compile the primitives in C
	(cd /usr/tools/src/C_lib; make)
#			# Now, compile the ratfor boot and library
	f77 -o rat4 /usr/tools/src/boot.f lib.a
	rm boot.o
#			# Generate the library
	(cd /usr/tools/src/ratfor_lib; make)
#			# The archiver and "trm" are necessary for
#			# the rest of the make files
	rat4 /usr/tools/src/ar1.boot >ar1.f
	f77 -o ar1 ar1.f lib.a
	rm ar1.f ar1.o
	rat4 /usr/tools/src/trm.w >trm.f
	f77 -o trm trm.f lib.a
	rm trm.f trm.o
