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