# Makefile for inquir on suns; by sra, heavily modified by jhbrown

VPATH = /common/inquir/src
HDRS =
SRCS = inquir-backend.c
DBUG = -g
EXES = inquir-backend
DEFS = '-DHOLMES_HOST="python"' -DINQUIR_KRB
LIBS = -L/usr/local/athena/lib -lkrb -ldes
INQUIRDIR = /usr/local/bin
ELDIR = /usr/local/emacs/lisp
# Boiler plate below here

CP = cp
MV = mv
CC = gcc
CFLAGS = $(DEFS)
ETAGS = etags
ETFLAGS = -t

all: TAGS Makedep
	$(MAKE) $(MFLAGS) -f Makefile -f Makedep $(EXES)

depend:
	$(RM) $(RMFLAGS) Makedep
	$(MAKE) $(MFLAGS) Makedep

Makedep: Makefile
	$(CC) $(CFLAGS) -M $(SRCS) >junk
	$(MV) junk Makedep

TAGS: $(HDRS) $(SRCS)
	$(ETAGS) $(ETFLAGS) $(HDRS) $(SRCS)

clean:
	$(RM) $(RMFLAGS) $(EXES) *.o

inquir-backend: inquir-backend.o
	$(CC) inquir-backend.o $(LIBS) -o inquir-backend

install: inquir-backend inquir.el
	install -c inquir.el $(ELDIR)
	install -c inquir-backend $(INQUIRDIR)
	mail -s "$$USER installed inquir on `hostname`" bug-inquir@lcs.mit.edu < /dev/null > /dev/null
	@echo '==========================================================='
	@echo "Don't forget to redump your emacs to deal with autoloading"
	@echo "INQUIR so that your users don't get confused."
	@echo ''
	@echo 'Since you are (presumably) a sysadmin, you may find it convenient'
	@echo 'to put the following in your .emacs file:'
	@echo ''
	@echo '(autoload '"'"'fake-password-entry "inquir"'
	@echo '  "Insert a password entry for a user at point, using INQUIR." t)'
	@echo ''
	@echo 'And, don't forget to put /common/inquir/inquir.man into'
	@echo '/usr/man/manl/inquir.l if it's not there already.'
	@echo '(Note that the man page has been revised as of 8/25/92)'
