-# $NetBSD: Makefile,v 1.21 2003/12/26 17:59:13 christos Exp $
+# $NetBSD: Makefile,v 1.31 2021/01/02 03:21:39 nat Exp $
# @(#)Makefile 8.3 (Berkeley) 7/24/94
-# Missing: ching dungeon warp
-# Moved: chess
-# Don't belong: xneko xroach
+SUBDIR= adventure arithmetic atc \
+ backgammon banner battlestar bcd boggle \
+ caesar canfield cgram ching colorbars countmail cribbage \
+ dm factor fish gomoku \
+ hack hals_end hangman hunt larn mille monop morse number \
+ phantasia pig pom ppt primes quiz \
+ rain random robots rogue sail snake testpat tetris trek \
+ wargames warp worm worms wtf wump
+TOPTARGETS= all clean install
-SUBDIR= adventure arithmetic atc backgammon banner battlestar bcd boggle \
- caesar canfield countmail cribbage dab dm factor fish fortune gomoku \
- hack hangman hunt larn mille monop morse number phantasia pig pom ppt \
- primes quiz rain random robots rogue sail snake tetris trek wargames \
- worm worms wtf wump
+$(TOPTARGETS): $(SUBDIR)
-.include <bsd.subdir.mk>
+$(SUBDIR):
+ $(MAKE) -C $@ $(MAKECMDGOALS)
+
+.PHONY: $(TOPTARGETS) $(SUBDIR)