BIN=/usr/local/bin
MAN=/usr/man
CC=cc
LN=ln -f

all:	finger chfn

finger:	finger.h finger.c
		$(CC) -o finger finger.c

chfn:	finger.h chfn.c
		$(CC) -o chfn chfn.c

install:
	strip finger
	$(LN) finger $(BIN)/finger
	chmog 04511 root root $(BIN)/finger
	strip chfn
	$(LN) chfn $(BIN)/chfn
	chmog 04511 root root $(BIN)/chfn

man:
	$(LN) chfn.man $(MAN)/LOCAL/chfn
	$(LN) finger.man $(MAN)/LOCAL/finger
	chmog 0444 bin bin $(MAN)/LOCAL/finger $(MAN)/LOCAL/chfn
	cp $(MAN)/local.index $(MAN)/local.index~
	chmod 0444 $(MAN)/local.index~
	echo "LOCAL/chfn	chfn	command to edit user's finger data" >> $(MAN)/local.index
	echo "LOCAL/finger	finger	finger another user's account information" >> $(MAN)/local.index

