1# 2# Copyright (c) 1987 Regents of the University of California. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms are permitted 6# provided that this notice is preserved and that due credit is given 7# to the University of California at Berkeley. The name of the University 8# may not be used to endorse or promote products derived from this 9# software without specific prior written permission. This software 10# is provided ``as is'' without express or implied warranty. 11# 12# @(#)Makefile 5.3 (Berkeley) 01/06/88 13# 14CFLAGS= -O 15 16# Programs that live in subdirectories, and have makefiles of their own. 17# 18SUBDIR= aard ching compat ddl zork 19 20# C sources that live in the current directory 21# 22SRCS= chess.c 23 24# C programs that live in the current directory and do not need 25# explicit make lines. 26# 27STD= chess 28 29all: ${SUBDIR} ${STD} 30 31${SUBDIR}: FRC 32 cd $@; make ${MFLAGS} 33 34${STD}: 35 ${CC} ${CFLAGS} -o $@ $@.c 36 37install: FRC 38 -for i in ${SUBDIR}; do \ 39 (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done 40 -for i in ${STD}; do \ 41 (install -s -o bin -g bin -m 755 $$i ${DESTDIR}/usr/games/$$i); \ 42 done 43 install -c -o bin -g bin -m 444 chess.bin ${DESTDIR}/usr/games/lib/chess 44 45clean: FRC 46 -for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done 47 rm -f ${STD} a.out core *.s *.o 48 49depend: FRC 50 -for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done 51 mkdep ${CFLAGS} ${SRCS} 52 53FRC: 54 55# DO NOT DELETE THIS LINE -- mkdep uses it. 56# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. 57 58chess.o: chess.c /usr/include/stdio.h 59 60# IF YOU PUT ANYTHING HERE IT WILL GO AWAY 61