|
|
1.1 ! root 1: # ! 2: # Copyright (c) 1980 Regents of the University of California. ! 3: # All rights reserved. The Berkeley software License Agreement ! 4: # specifies the terms and conditions for redistribution. ! 5: # ! 6: # @(#)Makefile 5.4 (Berkeley) 2/1/86 ! 7: # ! 8: DESTDIR= ! 9: CFLAGS= -O ! 10: ! 11: # Programs that live in subdirectories, and have makefiles of their own. ! 12: # ! 13: SUBDIR= aard adventure backgammon battlestar boggle ching compat \ ! 14: cribbage ddl doctor fortune hangman hunt mille monop quiz \ ! 15: robots rogue sail snake trek zork ! 16: ! 17: # Shell scripts that need only be installed and are never removed. ! 18: # ! 19: SCRIPT= wargames ! 20: ! 21: # C programs that live in the current directory and do not need ! 22: # explicit make lines. ! 23: # ! 24: STD= arithmetic btlgammon banner bcd cfscores chess factor \ ! 25: fish number wump ! 26: ! 27: # C programs that live in the current directory and need explicit make lines. ! 28: # ! 29: NSTD= canfield primes rain worm worms ! 30: ! 31: all: ${SUBDIR} ${STD} ${NSTD} ! 32: ! 33: ${SUBDIR}: FRC ! 34: cd $@; make ${MFLAGS} ! 35: ! 36: FRC: ! 37: ! 38: ${STD}: ! 39: cc ${CFLAGS} -o $@ [email protected] ! 40: ! 41: install: ! 42: -for i in ${SUBDIR}; do \ ! 43: (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done ! 44: -for i in ${SCRIPT}; do \ ! 45: (install -c $$i.sh ${DESTDIR}/usr/games/$$i); done ! 46: -for i in ${STD} ${NSTD}; do \ ! 47: (install -s $$i ${DESTDIR}/usr/games/$$i); done ! 48: install -c chess.bin ${DESTDIR}/usr/games/lib/chess ! 49: cat >${DESTDIR}/usr/games/lib/cfscores </dev/null ! 50: chmod 777 ${DESTDIR}/usr/games/lib/cfscores ! 51: ! 52: clean: ! 53: rm -f a.out core *.s *.o ! 54: -for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done ! 55: rm -f ${STD} ${NSTD} ! 56: ! 57: depend: ! 58: for i in ${STD} ${NSTD}; do \ ! 59: cc -M ${INCPATH} $$i.c | sed 's/\.o//' | \ ! 60: awk ' { if ($$1 != prev) \ ! 61: { if (rec != "") print rec; rec = $$0; prev = $$1; } \ ! 62: else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ ! 63: else rec = rec " " $$2 } } \ ! 64: END { print rec } ' >> makedep; done ! 65: echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep ! 66: echo '$$r makedep' >>eddep ! 67: echo 'w' >>eddep ! 68: cp Makefile Makefile.bak ! 69: ed - Makefile < eddep ! 70: rm eddep makedep ! 71: echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile ! 72: echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile ! 73: echo '# see make depend above' >> Makefile ! 74: ! 75: # Files listed in ${NSTD} have explicit make lines given below. ! 76: ! 77: canfield: ! 78: cc -o canfield ${CFLAGS} canfield.c -lcurses -ltermcap ! 79: ! 80: primes: ! 81: cc -o primes ${CFLAGS} primes.c -lm ! 82: ! 83: rain: ! 84: cc -o rain ${CFLAGS} rain.c -lcurses -ltermcap ! 85: ! 86: worm: ! 87: cc -o worm ${CFLAGS} worm.c -lcurses -ltermcap ! 88: ! 89: worms: ! 90: cc -o worms ${CFLAGS} worms.c -lcurses -ltermcap ! 91: ! 92: # DO NOT DELETE THIS LINE -- make depend uses it ! 93: ! 94: arithmetic: arithmetic.c /usr/include/stdio.h /usr/include/signal.h ! 95: btlgammon: btlgammon.c /usr/include/stdio.h ! 96: banner: banner.c /usr/include/stdio.h ! 97: bcd: bcd.c ! 98: cfscores: cfscores.c /usr/include/pwd.h ! 99: chess: chess.c /usr/include/stdio.h ! 100: factor: factor.c ! 101: fish: fish.c /usr/include/stdio.h ! 102: number: number.c ! 103: wump: wump.c /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h ! 104: wump: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h ! 105: canfield: canfield.c /usr/include/curses.h /usr/include/stdio.h ! 106: canfield: /usr/include/sgtty.h /usr/include/sys/ioctl.h ! 107: canfield: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h ! 108: canfield: /usr/include/ctype.h /usr/include/signal.h /usr/include/sys/types.h ! 109: primes: primes.c /usr/include/stdio.h /usr/include/math.h ! 110: rain: rain.c /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h ! 111: rain: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h ! 112: rain: /usr/include/signal.h ! 113: worm: worm.c /usr/include/ctype.h /usr/include/curses.h /usr/include/stdio.h ! 114: worm: /usr/include/sgtty.h /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h ! 115: worm: /usr/include/sys/ttydev.h /usr/include/signal.h ! 116: worms: worms.c /usr/include/stdio.h /usr/include/sgtty.h ! 117: worms: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h ! 118: worms: /usr/include/sys/ttydev.h /usr/include/signal.h ! 119: # DEPENDENCIES MUST END AT END OF FILE ! 120: # IF YOU PUT STUFF HERE IT WILL GO AWAY ! 121: # see make depend above
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.