MACHINE defined by make, now
[unix-history] / usr / src / games / Makefile
index 2867a76..4fccd8a 100644 (file)
@@ -3,19 +3,15 @@
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
-#      @(#)Makefile    5.3 (Berkeley) %G%
+#      @(#)Makefile    5.6 (Berkeley) 11/17/86
 #
 DESTDIR=
 CFLAGS=        -O
 
 #
 DESTDIR=
 CFLAGS=        -O
 
-# The following sources are incomplete and cannot be compiled without
-# some work
-WORK=  aard ddl mpu
-
 # Programs that live in subdirectories, and have makefiles of their own.
 #
 # Programs that live in subdirectories, and have makefiles of their own.
 #
-SUBDIR=        adventure backgammon battlestar boggle ching compat cribbage doctor \
-       fortune hangman hunt mille monop quiz robots rogue sail snake trek zork
+SUBDIR=        adventure backgammon battlestar boggle cribbage fortune \
+       hangman hunt mille monop quiz robots sail snake trek
 
 # Shell scripts that need only be installed and are never removed.
 #
 
 # Shell scripts that need only be installed and are never removed.
 #
@@ -24,14 +20,17 @@ SCRIPT=     wargames
 # C programs that live in the current directory and do not need
 # explicit make lines.
 #
 # C programs that live in the current directory and do not need
 # explicit make lines.
 #
-STD=   arithmetic btlgammon banner bcd cfscores chess factor \
-       fish number wump
+STD=   arithmetic btlgammon banner bcd cfscores factor fish number wump
 
 # C programs that live in the current directory and need explicit make lines.
 #
 NSTD=  canfield primes rain worm worms
 
 
 # C programs that live in the current directory and need explicit make lines.
 #
 NSTD=  canfield primes rain worm worms
 
+# Programs that require a lisp interpreter or compiler
+LISP=  doctor
+
 all:   ${SUBDIR} ${STD} ${NSTD}
 all:   ${SUBDIR} ${STD} ${NSTD}
+       cd games.${MACHINE}; make ${MFLAGS}
 
 ${SUBDIR}: FRC
        cd $@; make ${MFLAGS}
 
 ${SUBDIR}: FRC
        cd $@; make ${MFLAGS}
@@ -48,14 +47,16 @@ install:
                (install -c $$i.sh ${DESTDIR}/usr/games/$$i); done
        -for i in ${STD} ${NSTD}; do \
                (install -s $$i ${DESTDIR}/usr/games/$$i); done
                (install -c $$i.sh ${DESTDIR}/usr/games/$$i); done
        -for i in ${STD} ${NSTD}; do \
                (install -s $$i ${DESTDIR}/usr/games/$$i); done
-       install -c chess.bin ${DESTDIR}/usr/games/lib/chess
-       cat >${DESTDIR}/usr/games/lib/cfscores </dev/null
-       chmod 777 ${DESTDIR}/usr/games/lib/cfscores
+       -if [ ! -f ${DESTDIR}/usr/games/lib/cfscores ]; then \
+               cat >${DESTDIR}/usr/games/lib/cfscores </dev/null; \
+               chmod 777 ${DESTDIR}/usr/games/lib/cfscores; fi
+       cd games.${MACHINE}; make ${MFLAGS} DESTDIR=${DESTDIR} install
 
 clean:
        rm -f a.out core *.s *.o
        -for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
        rm -f ${STD} ${NSTD}
 
 clean:
        rm -f a.out core *.s *.o
        -for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
        rm -f ${STD} ${NSTD}
+       cd games.${MACHINE}; make ${MFLAGS} DESTDIR=${DESTDIR} clean
 
 depend:
        for i in ${STD} ${NSTD}; do \
 
 depend:
        for i in ${STD} ${NSTD}; do \
@@ -99,7 +100,6 @@ btlgammon: btlgammon.c /usr/include/stdio.h
 banner: banner.c /usr/include/stdio.h
 bcd: bcd.c
 cfscores: cfscores.c /usr/include/pwd.h
 banner: banner.c /usr/include/stdio.h
 bcd: bcd.c
 cfscores: cfscores.c /usr/include/pwd.h
-chess: chess.c /usr/include/stdio.h
 factor: factor.c
 fish: fish.c /usr/include/stdio.h
 number: number.c
 factor: factor.c
 fish: fish.c /usr/include/stdio.h
 number: number.c