]>
Commit | Line | Data |
---|---|---|
d1b2a10e | 1 | # |
2 | # Makefile for error-table routines | |
3 | # | |
4 | # Copyright 1987, 1989 MIT Student Information Processing Board | |
5 | # For copyright info, see mit-sipb-copyright.h. | |
6 | # | |
7 | # $Header$ | |
8 | # $Locker$ | |
9 | # | |
10 | ||
11 | CFLAGS= -O -I../../include | |
12 | LINTFLAGS= -uhvpb | |
13 | LINTFILES= error_message.c et_name.c init_et.c com_err.c | |
14 | LIBOBJS= error_message.o et_name.o init_et.o com_err.o | |
15 | DEPEND=$(BUILDTOP)/util/makedepend/makedepend | |
16 | ||
17 | BINDIR=/usr/athena | |
18 | INCDIR=/usr/include | |
19 | LIBDIR=/usr/athena/lib | |
20 | DOCDIR=/usr/doc/athena | |
21 | DESTDIR= | |
22 | ||
23 | FILES= Makefile et_name.c error_message.c compile_et.c \ | |
24 | error_table.y et_lex.lex.l init_et.c \ | |
25 | com_err.c com_err.h \ | |
26 | error_table.h mit-sipb-copyright.h \ | |
27 | test.c test1.et test2.et \ | |
28 | compiler.h internal.h | |
29 | ||
30 | CFILES= compile_et.c error_table.c error_message.c et_name.c \ | |
31 | init_et.c com_err.c | |
32 | ||
33 | # | |
34 | # what to build... | |
35 | # | |
36 | all: compile_et libcom_err.a | |
37 | ||
38 | lint: llib-lcom_err.ln | |
39 | ||
40 | archive: et.tar | |
41 | ||
42 | doc: com_err.dvi | |
43 | ||
44 | # | |
45 | # rules | |
46 | # | |
47 | .SUFFIXES: .h .c .et .ps .x9700 .mss .dvi .texinfo | |
48 | ||
49 | .et.c: | |
50 | ./compile_et $*.et | |
51 | ||
52 | .et.h: | |
53 | ./compile_et $*.et | |
54 | ||
55 | .texinfo.dvi: | |
56 | tex $< | |
57 | ||
58 | .dvi.ps: | |
59 | rm -f $@.new | |
60 | dvi2ps -r $< > $@.new | |
61 | mv $@.new $@ | |
62 | ||
63 | .c.o: | |
64 | ${CC} -c ${CFLAGS} $*.c | |
65 | ||
66 | # | |
67 | # real entries... | |
68 | # | |
69 | compile_et: compile_et.o error_table.o | |
70 | ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -ll | |
71 | ||
72 | et.tar: ${FILES} | |
73 | rm -f et.tar | |
74 | tar cfrlv et.tar ${FILES} | |
75 | ||
76 | tags: TAGS | |
77 | ||
78 | com_err.ps : com_err.dvi | |
79 | com_err.dvi: com_err.texinfo | |
80 | ||
81 | install: all | |
82 | # install -c -s compile_et ${DESTDIR}${BINDIR}/compile_et | |
83 | # install -c -m 444 com_err.h ${DESTDIR}${INCDIR}/com_err.h | |
84 | # install -c -m 444 mit-sipb-copyright.h \ | |
85 | # ${DESTDIR}${INCDIR}/mit-sipb-copyright.h | |
86 | # install -c libcom_err.a ${DESTDIR}${LIBDIR}/libcom_err.a | |
87 | # ranlib ${DESTDIR}${LIBDIR}/libcom_err.a | |
88 | # install -c libcom_err_p.a ${DESTDIR}${LIBDIR}/libcom_err_p.a | |
89 | # ranlib ${DESTDIR}${LIBDIR}/libcom_err_p.a | |
90 | # install -c com_err.texinfo ${DESTDIR}${DOCDIR}/com_err.texinfo | |
91 | # install -c com_err.3 ${DESTDIR}/usr/man/man3/com_err.3 | |
92 | # install -c compile_et.1 ${DESTDIR}/usr/man/man1/compile_et.1 | |
93 | ||
94 | config: | |
95 | -mkdir $(DESTDIR)/util/et | |
96 | for i in $(FILES); do \ | |
97 | rm -f ${DESTDIR}/util/et/`basename $$i`; \ | |
98 | ln -s $(SRCDIR)/util/et/$$i ${DESTDIR}/util/et/`basename $$i`; done | |
99 | rm -f ${DESTDIR}/util/et/Makefile | |
100 | cp ${SRCDIR}/util/et/Makefile ${DESTDIR}/util/et/Makefile | |
101 | chmod 644 ${DESTDIR}/util/et/Makefile | |
102 | ||
103 | ||
104 | TAGS: et_name.c error_message.c compile_et.c error_table.c \ | |
105 | lex.yy.c perror.c init_et.c | |
106 | etags et_name.c error_message.c compile_et.c \ | |
107 | error_table.c perror.c init_et.c | |
108 | ||
109 | libcom_err.a: $(LIBOBJS) | |
110 | ar cruv libcom_err.a $(LIBOBJS) | |
111 | ranlib libcom_err.a | |
112 | ||
113 | libcom_err_p.a: $(LIBOBJS) | |
114 | (cd profiled; ar uv ../libcom_err_p.a $(LIBOBJS); \ | |
115 | ranlib ../libcom_err_p.a) | |
116 | ||
117 | libcom_err.o: $(LIBOBJS) | |
118 | ld -r -s -o libcom_err.o $(LIBOBJS) | |
119 | chmod -x libcom_err.o | |
120 | ||
121 | llib-lcom_err.ln: $(LINTFILES) | |
122 | lint -Ccom_err $(LINTFLAGS) $(LINTFILES) | |
123 | ||
124 | clean: | |
125 | rm -f *~ \#* *.bak \ | |
126 | *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \ | |
127 | *.cp *.fn *.ky *.log *.pg *.tp *.vr \ | |
128 | *.o profiled/*.o libcom_err.a libcom_err_p.a \ | |
129 | com_err.o compile_et \ | |
130 | et.ar TAGS y.tab.c lex.yy.c error_table.c \ | |
131 | et_lex.lex.c \ | |
132 | test1.h test1.c test2.h test2.c test \ | |
133 | eddep makedep | |
134 | ||
135 | # for testing | |
136 | test: test.o test1.o test2.o libcom_err.a | |
137 | cc ${CFLAGS} -o test test.o test1.o test2.o libcom_err.a | |
138 | test.o: test1.h test2.h | |
139 | test1.o : test1.c | |
140 | test1.c : test1.et | |
141 | test2.o : test2.c | |
142 | test2.c : test2.et | |
143 | # 'make depend' code | |
144 | depend: ${CFILES} et_lex.lex.c | |
145 | @${DEPEND} ${CFLAGS} ${CFILES} | |
146 | ||
147 | # DO NOT DELETE THIS LINE -- make depend depends on it. | |
148 | ||
149 | compile_et.o: /usr/include/stdio.h /usr/include/sys/types.h | |
150 | compile_et.o: /usr/include/sys/file.h /usr/include/string.h | |
ebe57301 | 151 | compile_et.o: /usr/include/string.h /usr/include/sys/param.h |
d1b2a10e | 152 | compile_et.o: /usr/include/machine/machparam.h /usr/include/sys/signal.h |
ebe57301 | 153 | compile_et.o: mit-sipb-copyright.h compiler.h |
d1b2a10e | 154 | error_table.o: /usr/include/stdio.h /usr/include/string.h |
ebe57301 | 155 | error_table.o: /usr/include/string.h /usr/include/assert.h |
d1b2a10e | 156 | error_table.o: /usr/include/ctype.h /usr/include/sys/types.h |
157 | error_table.o: /usr/include/sys/time.h /usr/include/sys/time.h internal.h | |
ebe57301 | 158 | error_table.o: mit-sipb-copyright.h error_table.h et_lex.lex.c |
d1b2a10e | 159 | error_message.o: /usr/include/stdio.h error_table.h |
ebe57301 | 160 | error_message.o: mit-sipb-copyright.h internal.h |
161 | et_name.o: error_table.h mit-sipb-copyright.h internal.h | |
d1b2a10e | 162 | init_et.o: /usr/include/stdio.h error_table.h |
ebe57301 | 163 | init_et.o: mit-sipb-copyright.h |
164 | com_err.o: /usr/include/stdio.h mit-sipb-copyright.h | |
d1b2a10e | 165 | com_err.o: /usr/include/varargs.h error_table.h internal.h com_err.h |