1CFLAGS= -O 2LIBC= /lib/libc.a 3 4# Programs that live in subdirectories, and have makefiles of their own. 5# 6SUBDIR= cmd.${MACHINE} 7 8# Shell scripts that need only be installed and are never removed. 9# 10SCRIPT= Correct Spell difftc itroff 11 12# C sources that live in the current directory 13# 14SRCS= 20b.c 2621.c chgbars.c cpr.c dis.c dl.c \ 15 doorcard.c la.c rinfo.c sdiff.c showtc.c yank.c 16 17# C programs that live in the current directory and do not need 18# explicit make lines. 19# 20STD= 20b 2621 chgbars cpr dl doorcard rinfo sdiff yank 21 22# C programs that live in the current directory and need explicit make lines. 23# 24NSTD= dis showtc 25 26# Programs that get installed with special permissions 27# 28PERM= la 29 30all: ${SUBDIR} ${STD} ${PERM} ${NSTD} 31 32${SUBDIR}: FRC 33 cd $@; make ${MFLAGS} 34 35${STD} ${PERM}: ${LIBC} 36 ${CC} ${CFLAGS} -o $@ $@.c 37 38clean cleandir: FRC 39 -for i in ${SUBDIR} cmd.vax cmd.tahoe; do \ 40 (cd $$i; make ${MFLAGS} clean); \ 41 done 42 rm -f a.out core *.s *.o ${STD} ${PERM} ${NSTD} 43 44depend: ldepend 45 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done 46 47ldepend: FRC 48 mkdep -p ${CFLAGS} ${SRCS} 49 50install: FRC 51 -for i in ${SUBDIR}; do \ 52 (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done 53 -for i in ${SCRIPT}; do \ 54 (install -c -o bin -g bin -m 755 $$i.sh ${DESTDIR}/usr/local/$$i); \ 55 done 56 install -s -o bin -g bin -m 755 ${STD} ${NSTD} ${DESTDIR}/usr/local 57# programs that run with special permissions 58 install -s -o bin -g kmem -m 2755 la ${DESTDIR}/usr/local/la 59 60FRC: 61 62# Files listed in ${NSTD} and ${OPTIONAL} have explicit make lines given below. 63 64showtc dis: 65 ${CC} ${CFLAGS} -o $@ $@.c -ltermcap 66 67