#
# Makefile for configuration files
# things to make:
#	all		same as gueser and restart
#	advise		the guesser output processor
#	diffpw		the password diff'er
#	gendict		the dictionary generator
#	trans		the word transformer
#	update		the password repository updater
#	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/config.m4)

#
# local defines
#
SRC	= trans.c diffpw.c
OBJ	= trans.o diffpw.o
SH	= advise.sh checknew.sh gendict.sh update.sh
EXEC	= trans diffpw advise checknew gendict update
SEDSH	= $(SED) $(SED_RE) 's,%%BINDIR%%,$(DESTBIN),g' \
		 $(SED_RE) 's,%%LIBDIR%%,$(DESTLIB),g'

# do it all
all:	$(EXEC)

# set up the shell scripts
advise:		advise.sh   ; $(SEDSH) $? > $@ ; $(CHMOD) $(CHMOD_RWEOEA) $@
checknew:	checknew.sh ; $(SEDSH) $? > $@ ; $(CHMOD) $(CHMOD_RWEOEA) $@
gendict:	gendict.sh  ; $(SEDSH) $? > $@ ; $(CHMOD) $(CHMOD_RWEOEA) $@
update:		update.sh   ; $(SEDSH) $? > $@ ; $(CHMOD) $(CHMOD_RWEOEA) $@

# remake the makefile
Makefile:
	m4 Makefile.m4 > Makefile

# clean up
clean:
	$(RM) $(RM_FORCE) $(OBJ)

# really clean up
clobber:
	-$(RM) $(RM_FORCE) $(OBJ) $(EXEC)

#restore to original state
clobberall:
	-$(RM) $(RM_FORCE) $(OBJ) $(EXEC) Makefile
