# @(#)Makefile 4.6 (Berkeley) 2/8/83
# The following sources are incomplete and cannot be compiled without
# Programs that live in subdirectories, and have makefiles of their own.
SUBDIR
= adventure backgammon boggle compat cribbage doctor fortune \
mille monop quiz snake zork hangman
# Shell scripts that need only be installed and are never removed.
# C programs that live in the current directory and do not need
STD
= arithmetic btlgammon banner bcd chess fish number wump
# C programs that live in the current directory and need explicit make lines.
NSTD
= canfield rain worm worms
all: ${SUBDIR} ${STD} ${NSTD}
(cd
$$i; make
${MFLAGS} DESTDIR
=${DESTDIR} install); done
# for i in ${SCRIPT}; do (install -c $$i ${DESTDIR}/usr/games/$$i); done
for i in
${STD} ${NSTD}; do
(install $$i ${DESTDIR}/usr
/games
/$$i); done
install -c chess.bin
${DESTDIR}/usr
/games
/lib
/chess
for i in
${SUBDIR}; do
(cd
$$i; make
${MFLAGS} clean); done
for i in
${STD} ${NSTD}; do \
(echo
$$i: $$i.c
>>makedep
; \
/bin
/grep
'^#[ ]*include' x.c
$$i.c | sed \
-e
's,<\(.*\)>,"/usr/include/\1",' \
-e
's/:[^"]*"\([^"]*\)".*/: \1/' \
-e
's/\.c//' >>makedep
); done
echo
'/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
echo
'$$r makedep' >>eddep
echo
'# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
echo
'# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
echo
'# see make depend above' >> Makefile
# Files listed in ${NSTD} have explicit make lines given below.
cc -o canfield canfield.c
-lcurses
-ltermcap
cc -o rain rain.c
-lcurses
-ltermcap
cc -o worm worm.c
-lcurses
-ltermcap
cc -o worms worms.c
-lcurses
-ltermcap
# DO NOT DELETE THIS LINE -- make depend uses it
arithmetic
: /usr
/include/stdio.h
arithmetic
: /usr
/include/signal.h
btlgammon
: /usr
/include/stdio.h
banner
: /usr
/include/stdio.h
chess
: /usr
/include/stdio.h
arithmetic
: /usr
/include/stdio.h
arithmetic
: /usr
/include/signal.h
btlgammon
: /usr
/include/stdio.h
banner
: /usr
/include/stdio.h
chess
: /usr
/include/stdio.h
fish
: /usr
/include/stdio.h
wump
: /usr
/include/stdio.h
wump
: /usr
/include/sgtty.h
canfield
: /usr
/include/curses.h
canfield
: /usr
/include/ctype.h
canfield
: /usr
/include/signal.h
rain
: /usr
/include/stdio.h
rain
: /usr
/include/sgtty.h
rain
: /usr
/include/signal.h
worm
: /usr
/include/ctype.h
worm
: /usr
/include/curses.h
worm
: /usr
/include/signal.h
worms
: /usr
/include/stdio.h
worms
: /usr
/include/sgtty.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY