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