1# 2# Makefile 4.3 06/11/83 3# 4# C Shell with process control; VM/UNIX VAX Makefile 5# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 6# 7CFLAGS= -O -DTELL -DVMUNIX -Ddebug -DVFORK 8XSTR= /usr/ucb/xstr 9ED= -ed 10AS= -as 11RM= -rm 12CXREF= /usr/ucb/cxref 13VGRIND= csh /usr/ucb/vgrind 14CTAGS= /usr/ucb/ctags 15LIBES= 16SCCS= /usr/local/sccs 17 18# strings.o must be last in OBJS since it can change when previous files compile 19OBJS= alloc.o doprnt.o printf.o sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o \ 20 sh.exp.o sh.func.o sh.glob.o sh.hist.o sh.init.o sh.lex.o sh.misc.o \ 21 sh.parse.o sh.print.o sh.proc.o sh.sem.o sh.set.o sh.sig.o sh.time.o \ 22 strings.o 23 24# Special massaging of C files for sharing of strings 25.c.o: 26 ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - 27 ${CC} -c ${CFLAGS} x.c 28 mv x.o $*.o 29 30csh: ${OBJS} sh.local.h 31 rm -f csh 32 cc ${OBJS} -o csh ${LIBES} 33 34csh.prof: ${OBJS} sh.prof.o sh.local.h mcrt0.o 35 rm -f csh.prof 36 ld -X mcrt0.o ${OBJS} -o csh.prof ${LIBES} -lc 37 38sh.o.prof: 39 cp sh.c sh.prof.c 40 cc -c ${CFLAGS} -DPROF sh.prof.c 41 42.DEFAULT: 43 ${SCCS} get $< 44 45# need an old doprnt, whose output we can trap 46doprnt.o: doprnt.c 47 cc -E doprnt.c > doprnt.s 48 as -o doprnt.o doprnt.s 49 rm -f doprnt.s 50 51# strings.o and sh.init.o are specially processed to be shared 52strings.o: strings 53 ${XSTR} 54 ${CC} -c -R xs.c 55 mv xs.o strings.o 56 57sh.init.o: 58 ${CC} -E ${CFLAGS} sh.init.c | ${XSTR} -c - 59 ${CC} ${CFLAGS} -c -R x.c 60 mv x.o sh.init.o 61 62lint: 63 lint ${CFLAGS} sh*.c 64 65print: 66 @pr READ_ME 67 @pr makefile makefile.* 68 @(size -l a.out; size *.o) | pr -h SIZES 69 @${CXREF} sh*.c | pr -h XREF 70 @ls -l | pr 71 @pr sh*.h [a-rt-z]*.h sh*.c alloc.c 72 73vprint: 74 @pr -l84 READ_ME TODO 75 @pr -l84 makefile makefile.* 76 @(size -l a.out; size *.o) | pr -l84 -h SIZES 77 @${CXREF} sh*.c | pr -l84 -h XREF 78 @ls -l | pr -l84 79 @${CXREF} sh*.c | pr -l84 -h XREF 80 @pr -l84 sh*.h [a-rt-z]*.h sh*.c alloc.c 81 82vgrind: 83 @cp /dev/null index 84 @for i in *.h; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done 85 @for i in *.c; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done 86 @vgrind -t -x -h Index index >/crp/bill/csh/index.t 87 88install: csh sh.local.h 89 install -s csh ${DESTDIR}/bin/csh 90 91clean: 92 ${RM} -f a.out strings x.c xs.c csh errs 93 ${RM} -f *.o sh.prof.c 94 95tags: /tmp 96 ${CTAGS} sh*.c 97