Add define for Kirk Smith's USR Courier driver. Change default baud
[unix-history] / usr / src / bin / csh / Makefile
CommitLineData
fef62a9f 1#
b79f4fa9 2# Copyright (c) 1980 Regents of the University of California.
094e80ed 3# All rights reserved. The Berkeley Software License Agreement
b79f4fa9
DF
4# specifies the terms and conditions for redistribution.
5#
9bdca61e 6# @(#)Makefile 5.3 (Berkeley) %G%
fef62a9f
BJ
7#
8# C Shell with process control; VM/UNIX VAX Makefile
9# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
10#
35371dec
EW
11# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
12
13DEFS= -DTELL -DVFORK -DFILEC
14CFLAGS= $(DEFS) -O
fef62a9f 15XSTR= /usr/ucb/xstr
35371dec 16AS= as
fef62a9f
BJ
17RM= -rm
18CXREF= /usr/ucb/cxref
9bdca61e 19VGRIND= /usr/ucb/vgrind
fef62a9f 20CTAGS= /usr/ucb/ctags
6ca601c1 21LIBES=
bd9be69e 22SCCS= sccs
fef62a9f 23
35371dec
EW
24OBJS= alloc.o doprnt.o printf.o sh.o sh.char.o sh.dir.o sh.dol.o sh.err.o \
25 sh.exec.o sh.exp.o sh.file.o sh.func.o sh.glob.o sh.hist.o sh.init.o \
26 sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.proc.o sh.sem.o sh.set.o \
27 sh.time.o
fef62a9f
BJ
28
29# Special massaging of C files for sharing of strings
30.c.o:
31 ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
32 ${CC} -c ${CFLAGS} x.c
f7f80f24 33 mv -f x.o $*.o
644ec8bb 34 rm -f x.c
fef62a9f 35
35371dec
EW
36# strings.o must be last since it can change when previous files compile
37csh: ${OBJS} strings.o
fef62a9f 38 rm -f csh
9bdca61e 39 ${CC} ${CFLAGS} ${OBJS} strings.o -o csh ${LIBES}
fef62a9f
BJ
40
41.DEFAULT:
42 ${SCCS} get $<
43
44# need an old doprnt, whose output we can trap
45doprnt.o: doprnt.c
35371dec 46 ${CC} -E doprnt.c | ${AS} -o doprnt.o
fef62a9f 47
9bdca61e 48# strings.o, sh.init.o, and sh.char.o are specially processed to be shared
fef62a9f
BJ
49strings.o: strings
50 ${XSTR}
51 ${CC} -c -R xs.c
f7f80f24 52 mv -f xs.o strings.o
644ec8bb 53 rm -f xs.c
fef62a9f 54
9bdca61e
JL
55sh.char.o sh.init.o:
56 ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
fef62a9f 57 ${CC} ${CFLAGS} -c -R x.c
9bdca61e 58 mv -f x.o $*.o
644ec8bb 59 rm -f x.c
fef62a9f
BJ
60
61lint:
35371dec 62 lint -z ${DEFS} sh*.c alloc.c
fef62a9f
BJ
63
64print:
65 @pr READ_ME
9bdca61e 66 @pr Makefile Makefile.*
fef62a9f
BJ
67 @(size -l a.out; size *.o) | pr -h SIZES
68 @${CXREF} sh*.c | pr -h XREF
69 @ls -l | pr
70 @pr sh*.h [a-rt-z]*.h sh*.c alloc.c
71
72vprint:
73 @pr -l84 READ_ME TODO
9bdca61e 74 @pr -l84 Makefile Makefile.*
fef62a9f
BJ
75 @(size -l a.out; size *.o) | pr -l84 -h SIZES
76 @${CXREF} sh*.c | pr -l84 -h XREF
77 @ls -l | pr -l84
78 @${CXREF} sh*.c | pr -l84 -h XREF
79 @pr -l84 sh*.h [a-rt-z]*.h sh*.c alloc.c
80
81vgrind:
82 @cp /dev/null index
9bdca61e
JL
83 @-mkdir grind
84 for i in *.h; do ${VGRIND} -t -h "C Shell" $$i >grind/$$i.t; done
85 for i in *.c; do ${VGRIND} -t -h "C Shell" $$i >grind/$$i.t; done
86 ${VGRIND} -t -x -h Index index >grind/index.t
fef62a9f 87
35371dec 88install: csh
fef62a9f
BJ
89 install -s csh ${DESTDIR}/bin/csh
90
91clean:
2f2a0649 92 ${RM} -f a.out strings x.c xs.c csh errs
35371dec 93 ${RM} -f *.o
9bdca61e 94 ${RM} -rf vgrind
35371dec
EW
95
96tags:
9bdca61e 97 ${CTAGS} -t *.h sh*.c
fef62a9f 98
9bdca61e 99sh.o: sh.h sh.local.h sh.char.h
35371dec 100sh.char.o: sh.char.h
bd9be69e
EW
101sh.dir.o: sh.h sh.local.h sh.dir.h
102sh.dol.o: sh.h sh.local.h sh.char.h
9bdca61e
JL
103sh.err.o: sh.h sh.local.h sh.char.h
104sh.exec.o: sh.h sh.local.h sh.char.h
105sh.exp.o: sh.h sh.local.h sh.char.h
106sh.file.o: sh.h sh.local.h sh.char.h
107sh.func.o: sh.h sh.local.h sh.char.h
bd9be69e 108sh.glob.o: sh.h sh.local.h sh.char.h
9bdca61e 109sh.hist.o: sh.h sh.local.h sh.char.h
35371dec 110sh.init.o: sh.local.h
bd9be69e 111sh.lex.o: sh.h sh.local.h sh.char.h
9bdca61e
JL
112sh.misc.o: sh.h sh.local.h sh.char.h
113sh.parse.o: sh.h sh.local.h sh.char.h
114sh.print.o: sh.h sh.local.h sh.char.h
115sh.proc.o: sh.h sh.local.h sh.dir.h sh.proc.h sh.char.h
116sh.sem.o: sh.h sh.local.h sh.proc.h sh.char.h
117sh.set.o: sh.h sh.local.h sh.char.h
118sh.time.o: sh.h sh.local.h sh.char.h