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.5 (Berkeley) 05/31/87 7# 8# C Shell with process control; VM/UNIX VAX Makefile 9# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 10# 11# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. 12 13DEFS= -DTELL -DVFORK -DFILEC 14CFLAGS= $(DEFS) -O 15XSTR= /usr/ucb/xstr 16AS= as 17RM= -rm 18CXREF= /usr/ucb/cxref 19VGRIND= /usr/ucb/vgrind 20CTAGS= /usr/ucb/ctags 21LIBES= 22SCCS= sccs 23 24#ifdef vax 25#MACHOBJS=doprnt.o 26#else 27MACHOBJS= 28#endif 29OBJS= alloc.o printf.o sh.o sh.char.o sh.dir.o sh.dol.o sh.err.o \ 30 sh.exec.o sh.exp.o sh.file.o sh.func.o sh.glob.o sh.hist.o sh.init.o \ 31 sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.proc.o sh.sem.o sh.set.o \ 32 sh.time.o ${MACHOBJS} 33 34# Special massaging of C files for sharing of strings 35.c.o: 36 ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - 37 ${CC} -c ${CFLAGS} x.c 38 mv -f x.o $*.o 39 rm -f x.c 40 41# strings.o must be last since it can change when previous files compile 42csh: ${OBJS} strings.o 43 rm -f csh 44 ${CC} ${CFLAGS} ${OBJS} strings.o -o csh ${LIBES} 45 46.DEFAULT: 47 ${SCCS} get $< 48 49# need an old doprnt, whose output we can trap 50doprnt.o: doprnt.c 51 ${CC} -E doprnt.c | ${AS} -o doprnt.o 52 53# strings.o, sh.init.o, and sh.char.o are specially processed to be shared 54strings.o: strings 55 ${XSTR} 56 ${CC} -c -R xs.c 57 mv -f xs.o strings.o 58 rm -f xs.c 59 60sh.char.o sh.init.o: 61 ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - 62 ${CC} ${CFLAGS} -c -R x.c 63 mv -f x.o $*.o 64 rm -f x.c 65 66lint: 67 lint -z ${DEFS} sh*.c alloc.c 68 69print: 70 @pr READ_ME 71 @pr Makefile Makefile.* 72 @(size -l a.out; size *.o) | pr -h SIZES 73 @${CXREF} sh*.c | pr -h XREF 74 @ls -l | pr 75 @pr sh*.h [a-rt-z]*.h sh*.c alloc.c 76 77vprint: 78 @pr -l84 READ_ME TODO 79 @pr -l84 Makefile Makefile.* 80 @(size -l a.out; size *.o) | pr -l84 -h SIZES 81 @${CXREF} sh*.c | pr -l84 -h XREF 82 @ls -l | pr -l84 83 @${CXREF} sh*.c | pr -l84 -h XREF 84 @pr -l84 sh*.h [a-rt-z]*.h sh*.c alloc.c 85 86vgrind: 87 @cp /dev/null index 88 @-mkdir grind 89 for i in *.h; do ${VGRIND} -t -h "C Shell" $$i >grind/$$i.t; done 90 for i in *.c; do ${VGRIND} -t -h "C Shell" $$i >grind/$$i.t; done 91 ${VGRIND} -t -x -h Index index >grind/index.t 92 93install: csh 94 install -s csh ${DESTDIR}/bin/csh 95 96depend: 97 98clean: 99 ${RM} -f a.out strings x.c xs.c csh errs 100 ${RM} -f *.o 101 ${RM} -rf vgrind 102 103tags: 104 ${CTAGS} -t *.h sh*.c 105 106sh.o: sh.h sh.local.h sh.char.h 107sh.char.o: sh.char.h 108sh.dir.o: sh.h sh.local.h sh.dir.h 109sh.dol.o: sh.h sh.local.h sh.char.h 110sh.err.o: sh.h sh.local.h sh.char.h 111sh.exec.o: sh.h sh.local.h sh.char.h 112sh.exp.o: sh.h sh.local.h sh.char.h 113sh.file.o: sh.h sh.local.h sh.char.h 114sh.func.o: sh.h sh.local.h sh.char.h 115sh.glob.o: sh.h sh.local.h sh.char.h 116sh.hist.o: sh.h sh.local.h sh.char.h 117sh.init.o: sh.local.h 118sh.lex.o: sh.h sh.local.h sh.char.h 119sh.misc.o: sh.h sh.local.h sh.char.h 120sh.parse.o: sh.h sh.local.h sh.char.h 121sh.print.o: sh.h sh.local.h sh.char.h 122sh.proc.o: sh.h sh.local.h sh.dir.h sh.proc.h sh.char.h 123sh.sem.o: sh.h sh.local.h sh.proc.h sh.char.h 124sh.set.o: sh.h sh.local.h sh.char.h 125sh.time.o: sh.h sh.local.h sh.char.h 126