# $Header:Makefile 12.0$
# $ACIS:Makefile 12.0$
# $Source: /ibm/acis/usr/src/usr.bin/spell/RCS/Makefile,v $
#
#	@(#)Makefile	4.3	5/25/83

CFLAGS= -O
IFLAGS=-c -s
DICT=./

all:	spell spellin spellout

install: all ${DESTDIR}/usr/dict ${DESTDIR}/usr/dict/spellhist hlist hlista hlistb hstop
	install ${IFLAGS} spell       ${DESTDIR}/usr/lib/spell
	install ${IFLAGS} spellin     ${DESTDIR}/usr/bin/spellin
	install ${IFLAGS} spellout    ${DESTDIR}/usr/bin/spellout
	install -c -m 644 connectives ${DESTDIR}/usr/dict/connectives
	install -c 	  hlista      ${DESTDIR}/usr/dict/hlista
	install -c 	  hlistb      ${DESTDIR}/usr/dict/hlistb
	install -c 	  hstop       ${DESTDIR}/usr/dict/hstop
	install -c 	  spell.sh    ${DESTDIR}/usr/bin/spell

install_web2:
	install -c -m 664 web2 	      ${DESTDIR}/usr/dict/web2
	install -c -m 664 web2a       ${DESTDIR}/usr/dict/web2a

${DESTDIR}/usr/dict/spellhist:
	-rm -f $@
	ln -s /dev/null $@

clean:	
	rm -f *.o core spell spellin hlista hlistb hlist hstop spellout

spell: spell.o
	${CC} spell.o -o spell
spellin: spellin.o
	${CC} spellin.o -o spellin
spellout: spellout.o
	${CC} spellout.o -o spellout

hlist: ${DESTDIR}/usr/dict/words spellin
	${DICT}/spellin < ${DESTDIR}/usr/dict/words >hlist
hlista: american local hlist spellin
	(cat american local)|${DICT}/spellin hlist >hlista
hlistb: british local hlist spellin
	(cat british local)|${DICT}/spellin hlist >hlistb
hstop: stop spellin
	${DICT}/spellin <stop >hstop

${DESTDIR}/usr/dict/words:
	cp words $@
	chmod 644 $@

${DESTDIR}/usr/dict:
	mkdir $@
	chmod 755 $@
