#
# Makefile for configuration files
# things to make:
#	defines		the program to generate your system include file
#	Makefile	to regenerate the Makefile
#	clean		to delete intermediate files
#	clobber		to delete all files except the original sources
#			and the Makefile
#	clobberall	to delete all files except the original sources
#
#################################################################
# Copyright notice.						#
# This software is copyrighted (c) 1991 by Matt Bishop and the	#
# Trustees of Dartmouth College.  All rights reserved.		#
# 								#
# Author:	Matt Bishop					#
# Address:	Department of Mathematics and Computer Science	#
#	 	Dartmouth College				#
# 		Hanover, NH  03755-1831				#
# 		USA						#
# telephone:	+1 603 646 3267					#
# fax:		+1 603 646 1312					#
# internet:	Matt.Bishop@dartmouth.edu			#
# usenet:	...!decvax!dartvax!Matt.Bishop			#
#################################################################
#
VERSION="Version GAMMA 6/31/91 Matt.Bishop@dartmouth.edu"	# version

# the M4 configuration file
include(config.m4)

# the system include file generator
defines:	defines.m4 config.m4
	$(M4) < defines.m4 > defines.c
	$(CC) defines.c -o defines -lm

machine:	defines SourceRoot/lib/include/HostType.h
	-(cd SourceRoot/lib/include; $(MV) HostType.h HostType.h.bak)
	defines > SourceRoot/lib/include/HostType.h
	
includefiles:
	(cd SourceRoot/lib/Version; $(CP) des.h ../include)
	(cd SourceRoot/lib/Version; $(CP) desproto.h ../include)

# regenerate the Makefile
Makefile:	Makefile.m4
	$(M4) Makefile.m4 > Makefile

# clean up
clean:
	-$(RM) $(RM_FORCE) defines.c

# really clean up
clobber:
	-$(RM) $(RM_FORCE) defines.c defines

# restore to original condition
clobberall:
	-$(RM) $(RM_FORCE) defines.c defines Makefile

