-# @(#)Makefile 4.4 %G%
-
-# The word lists may be extended by adding local words.
-# The set of files containing words to be added are defined
-# by LOCAL below. By default we add commands and library
-# function names defined in /usr/man/man[1238n].
-
-LOCAL=special.4bsd
-
-CFLAGS= -O
-
-all: spell hlist hlista hlistb hstop spellin spellout
-
-install: all
- install -s spell $(DESTDIR)/usr/lib
- install -s spellin ${DESTDIR}/usr/bin
- install -s spellout ${DESTDIR}/usr/bin
- install -c spell.sh $(DESTDIR)/usr/bin/spell
- install -c hlista $(DESTDIR)/usr/dict
- install -c hlistb $(DESTDIR)/usr/dict
- install -c hstop $(DESTDIR)/usr/dict
- install -c words $(DESTDIR)/usr/dict
- install -c american $(DESTDIR)/usr/dict
- install -c british $(DESTDIR)/usr/dict
- install -c stop $(DESTDIR)/usr/dict
- install -c README $(DESTDIR)/usr/dict
- -mkdir $(DESTDIR)/usr/dict/special
- install -c special.4bsd $(DESTDIR)/usr/dict/special/4bsd
- install -c special.math $(DESTDIR)/usr/dict/special/math
-
-clean:
- rm -f *.o 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: /usr/dict/words spellin
- spellin <words >hlist
-hlista: american $(LOCAL) hlist spellin
- (cat american $(LOCAL))|spellin hlist >hlista
-hlistb: british $(LOCAL) hlist spellin
- (cat british $(LOCAL))|spellin hlist >hlistb
+# @(#)Makefile 8.1 (Berkeley) %G%
+
+LIBC= /usr/lib/libc.a
+SRCS= spell.c spellin.c spellout.c
+MAN1= spell.0
+MLINKS= spell.1 spellin.1 spell.1 spellout.1
+SPECIAL=${.CURDIR}/special.4bsd
+
+all: spell hlist hlista hlistb hstop spellin spellout ${MAN1}
+
+spell spellin spellout: ${LIBC}
+ ${CC} ${CFLAGS} ${.CURDIR}/${.PREFIX}.c -o ${.TARGET}
+
+hlist: spellin
+ spellin < /usr/share/dict/words > hlist
+
+hlista: american ${SPECIAL} hlist spellin
+ (cat ${.CURDIR}/american ${SPECIAL}) | spellin hlist > hlista
+
+hlistb: british ${SPECIAL} hlist spellin
+ (cat ${.CURDIR}/british ${SPECIAL}) | spellin hlist > hlistb
+