# @(#)Makefile	1.1	12/17/82
#
#

SRC	= dropword.c score.c match.c
OBJ	= dropword.o score.o match.o
LIB	= -lcurses -ltermcap
CFLAGS	= -2 -j -Osal -w3 -zc

dropword:$(OBJ)
	cc $(CFLAGS) -M -o dropword $(OBJ) $(LIB)

.c.o:	; cc $(CFLAGS) -c ./$*.c

$(SRC):
	sccs get $@

clean:
	rm -f *.o dropword *.BAK *.CKP

install:
	installpgm dropword
	chmod 711 /usr/local/dropword

man:
	cp dropword.6 /usr/man/man6

depend:
	grep '^#include' ${SRC} \
		| sed 's/:[^"]*"\([^"]*\)".*/: \1/' \
		| sed '/<.*>/d'\
		| sed 's/\.[cyls]\:/.o:/' > makedep
	echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
	echo '$$r makedep' >>eddep
	echo 'w' >>eddep
	cp Makefile .Makefile
	ed - Makefile < eddep
	rm eddep makedep
	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
	echo '# see make depend above' >> Makefile

# DO NOT DELETE THIS LINE -- make depend uses it
# DEPENDENCIES MUST END AT END OF FILE
score.o: score.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
