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