2 # Makefile for error-table routines
4 # Copyright 1987, 1989 MIT Student Information Processing Board
5 # For copyright info, see mit-sipb-copyright.h.
11 CFLAGS= -O -I../../include
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
19 LIBDIR=/usr/athena/lib
20 DOCDIR=/usr/doc/athena
23 FILES= Makefile et_name.c error_message.c compile_et.c \
24 error_table.y et_lex.lex.l init_et.c \
26 error_table.h mit-sipb-copyright.h \
27 test.c test1.et test2.et \
30 CFILES= compile_et.c error_table.c error_message.c et_name.c \
36 all: compile_et libcom_err.a
38 lint: llib-lcom_err.ln
47 .SUFFIXES: .h .c .et .ps .x9700 .mss .dvi .texinfo
64 ${CC} -c ${CFLAGS} $*.c
69 compile_et: compile_et.o error_table.o
70 ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -ll
74 tar cfrlv et.tar ${FILES}
78 com_err.ps : com_err.dvi
79 com_err.dvi: com_err.texinfo
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
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
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
109 libcom_err.a: $(LIBOBJS)
110 ar cruv libcom_err.a $(LIBOBJS)
113 libcom_err_p.a: $(LIBOBJS)
114 (cd profiled; ar uv ../libcom_err_p.a $(LIBOBJS); \
115 ranlib ../libcom_err_p.a)
117 libcom_err.o: $(LIBOBJS)
118 ld -r -s -o libcom_err.o $(LIBOBJS)
119 chmod -x libcom_err.o
121 llib-lcom_err.ln: $(LINTFILES)
122 lint -Ccom_err $(LINTFLAGS) $(LINTFILES)
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 \
132 test1.h test1.c test2.h test2.c test \
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
144 depend: ${CFILES} et_lex.lex.c
145 @${DEPEND} ${CFLAGS} ${CFILES}
147 # DO NOT DELETE THIS LINE -- make depend depends on it.
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
151 compile_et.o: /usr/include/strings.h /usr/include/sys/param.h
152 compile_et.o: /usr/include/machine/machparam.h /usr/include/sys/signal.h
153 compile_et.o: ../../include/mit-sipb-copyright.h compiler.h
154 error_table.o: /usr/include/stdio.h /usr/include/string.h
155 error_table.o: /usr/include/strings.h /usr/include/assert.h
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
158 error_table.o: ../../include/mit-sipb-copyright.h error_table.h et_lex.lex.c
159 error_message.o: /usr/include/stdio.h error_table.h
160 error_message.o: ../../include/mit-sipb-copyright.h internal.h
161 et_name.o: error_table.h ../../include/mit-sipb-copyright.h internal.h
162 init_et.o: /usr/include/stdio.h error_table.h
163 init_et.o: ../../include/mit-sipb-copyright.h
164 com_err.o: /usr/include/stdio.h ../../include/mit-sipb-copyright.h
165 com_err.o: /usr/include/varargs.h error_table.h internal.h com_err.h