X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/810b140d8d0aea516f8a17534359a3345ba071fa..6535b2e014adf4ec8033eaf18a55e8476d124cda:/Makefile diff --git a/Makefile b/Makefile index e9216426..b3c9d43e 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,34 @@ -# @(#)Makefile 5.15.1.2 (Berkeley) 5/8/91 +# $NetBSD: Makefile,v 1.31 2021/01/02 03:21:39 nat Exp $ +# @(#)Makefile 8.3 (Berkeley) 7/24/94 -#Missing: adventure boggle ching dungeon hunt phantasia warp +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= arithmetic atc backgammon banner battlestar bcd caesar canfield \ - cribbage dm factor fish fortune hack hangman larn \ - mille monop morse number pom ppt primes quiz rain robots rogue \ - sail snake trek wargames worm worms wump +PREFIX ?= /usr +LOCALSTATEDIR ?= /var +SYSCONFDIR ?= /etc +ROOT := $(shell pwd) -.include +export ROOT PREFIX LOCALSTATEDIR SYSCONFDIR + +$(TOPTARGETS): $(SUBDIR) + +$(SUBDIR): config.h + +$(MAKE) -C $@ $(MAKECMDGOALS) + +config.h: + @echo "#define PREFIX \"$(PREFIX)\"" > config.h + @echo "#define LOCALSTATEDIR \"$(LOCALSTATEDIR)\"" >> config.h + @echo "#define SYSCONFDIR \"$(SYSCONFDIR)\"" >> config.h + +clean: + rm -f config.h + +.PHONY: $(TOPTARGETS) $(SUBDIR)