-# $NetBSD: Makefile,v 1.12 1997/10/11 09:34:16 mycroft Exp $
-# @(#)Makefile 8.1 (Berkeley) 6/11/93
+all: dictionary dictindex boggle
-SUBDIR= boggle mkdict mkindex
+mkdict:
+ $(MAKE) -C mkdict
-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
-FILES=dictionary dictindex
-FILESDIR=/usr/share/games/boggle
-CLEANFILES+=${FILES}
+mkindex:
+ $(MAKE) -C mkindex
-all: ${FILES}
+boggle:
+ $(MAKE) -C boggle
-${MKDICT}:
- @cd ${.CURDIR}/mkdict && ${MAKE}
+clean:
+ rm -f dictionary dictindex
+ $(MAKE) -C mkdict clean
+ $(MAKE) -C mkindex clean
+ $(MAKE) -C boggle clean
-${MKINDEX}:
- @cd ${.CURDIR}/mkindex && ${MAKE}
-
+dictionary: mkdict
+ ./mkdict/mkdict < mkdict/web2 > dictionary
-dictionary: ${WORDS} ${MKDICT}
- rm -f ${.TARGET}
- ${MKDICT} < ${WORDS} > ${.TARGET}
+dictindex: mkindex dictionary
+ ./mkindex/mkindex < dictionary > dictindex
-dictindex: dictionary ${MKINDEX}
- rm -f ${.TARGET}
- ${MKINDEX} < dictionary > ${.TARGET}
+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
-.include <bsd.prog.mk>
-.include <bsd.subdir.mk>
+.PHONY: all clean install mkdict mkindex boggle