-# $NetBSD: Makefile,v 1.13 1998/09/29 07:33:20 lukem Exp $
-# @(#)Makefile 8.1 (Berkeley) 6/11/93
-
-SUBDIR= boggle mkdict mkindex
-
-MKDICT!=cd $(.CURDIR)/mkdict; \
- printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/mkdict\n" | ${MAKE} -s -f-
-MKINDEX!=cd $(.CURDIR)/mkindex; \
- printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/mkindex\n" | ${MAKE} -s -f-
-WORDS=${.CURDIR}/../../share/dict/web2
-DICTFILES=dictionary dictindex
-.if !defined(NOSHARE)
-FILES=${DICTFILES}
-FILESDIR=/usr/share/games/boggle
-.endif
-CLEANFILES+=${DICTFILES}
-
-all: ${FILES}
-
-${MKDICT}:
- @cd ${.CURDIR}/mkdict && ${MAKE}
-
-${MKINDEX}:
- @cd ${.CURDIR}/mkindex && ${MAKE}
-
-
-dictionary: ${WORDS} ${MKDICT}
- rm -f ${.TARGET}
- ${MKDICT} < ${WORDS} > ${.TARGET}
-
-dictindex: dictionary ${MKINDEX}
- rm -f ${.TARGET}
- ${MKINDEX} < dictionary > ${.TARGET}
-
-.include <bsd.prog.mk>
-.include <bsd.subdir.mk>
+all: dictionary dictindex boggle
+
+mkdict:
+ $(MAKE) -C mkdict
+
+mkindex:
+ $(MAKE) -C mkindex
+
+boggle:
+ $(MAKE) -C boggle
+
+clean:
+ rm -f dictionary dictindex
+ $(MAKE) -C mkdict clean
+ $(MAKE) -C mkindex clean
+ $(MAKE) -C boggle clean
+
+dictionary: mkdict
+ ./mkdict/mkdict < mkdict/web2 > dictionary
+
+dictindex: mkindex dictionary
+ ./mkindex/mkindex < dictionary > dictindex
+
+install: dictindex dictionary boggle
+ $(GINSTALL) -Dm644 dictionary $(DESTDIR)/$(PREFIX)/share/games/boggle/dictionary
+ $(GINSTALL) -Dm644 dictindex $(DESTDIR)/$(PREFIX)/share/games/boggle/dictindex
+ $(MAKE) -C boggle install
+
+.PHONY: all clean install mkdict mkindex boggle