2 # Makefile for error-table routines
4 # Copyright 1987, 1989 MIT Student Information Processing Board
5 # For copyright info, see mit-sipb-cr.h.
8 include @TOP_OBJDIR@/src/config/Makefile.config
9 include @TOP_OBJDIR@/src/config/Makefile.lwp
12 all: compile_et ${TOP_INCDIR}/afs/com_err.h ${TOP_INCDIR}/afs/error_table.h ${TOP_INCDIR}/afs/mit-sipb-cr.h ${TOP_LIBDIR}/libafscom_err.a
14 buildtools: compile_et
16 ${TOP_INCDIR}/afs/com_err.h: com_err.h
19 ${TOP_INCDIR}/afs/error_table.h: error_table.h
22 ${TOP_INCDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
25 ${TOP_LIBDIR}/libafscom_err.a: libafscom_err.a
28 et_lex.lex.c: et_lex.lex.l
30 $(LEX) -t $(srcdir)/et_lex.lex.l > et_lex.lex.c
32 compile_et: compile_et.o error_table.o
34 *_linux* | *_umlinux* ) \
35 $(AFS_LDRULE) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr;; \
37 $(AFS_LDRULE) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr -ll;; \
40 libafscom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
42 $(AR) crv $@ error_msg.o et_name.o com_err.o AFS_component_version_number.o
46 # When we build this file, we're using a .c file that's in the object directory,
47 # so we need to add the source directory to the includes to pick up local headers.
49 CFLAGS_error_table.o= -I${srcdir} @CFLAGS_NOUNUSED@ @CFLAGS_NOOLDSTYLE@
52 # Installation targets
54 install: compile_et com_err.h error_table.h mit-sipb-cr.h libafscom_err.a
55 ${INSTALL} -d ${DESTDIR}${bindir}
56 ${INSTALL} -d ${DESTDIR}${includedir}/afs
57 ${INSTALL} -d ${DESTDIR}${libdir}/afs
58 ${INSTALL_PROGRAM} compile_et ${DESTDIR}${bindir}/afs_compile_et
59 ${INSTALL_DATA} ${srcdir}/com_err.h ${DESTDIR}${includedir}/afs/com_err.h
60 ${INSTALL_DATA} ${srcdir}/error_table.h ${DESTDIR}${includedir}/afs/error_table.h
61 ${INSTALL_DATA} ${srcdir}/mit-sipb-cr.h ${DESTDIR}${includedir}/afs/mit-sipb-cr.h
62 ${INSTALL_DATA} libafscom_err.a ${DESTDIR}${libdir}/afs/libafscom_err.a
64 dest: compile_et com_err.h error_table.h mit-sipb-cr.h libafscom_err.a
65 ${INSTALL} -d ${DEST}/bin
66 ${INSTALL} -d ${DEST}/include/afs
67 ${INSTALL} -d ${DEST}/lib/afs
68 ${INSTALL_PROGRAM} compile_et ${DEST}/bin/afs_compile_et
69 ${INSTALL_DATA} ${srcdir}/com_err.h ${DEST}/include/afs/com_err.h
70 ${INSTALL_DATA} ${srcdir}/error_table.h ${DEST}/include/afs/error_table.h
71 ${INSTALL_DATA} ${srcdir}/mit-sipb-cr.h ${DEST}/include/afs/mit-sipb-cr.h
72 ${INSTALL_DATA} libafscom_err.a ${DEST}/lib/afs/libafscom_err.a
75 $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
76 *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libafscom_err.a \
77 com_err.o compile_et et.ar TAGS y.tab.c lex.yy.c error_table.c \
78 et_lex.lex.c test1.h test1.c test2.h test2.c \
79 eddep makedep core AFS_component_version_number.c
84 compile_et.o: AFS_component_version_number.c
85 # specify yacc build product as a dependency so our .c.o rule will apply
86 error_table.o: et_lex.lex.c error_table.c
88 include ../config/Makefile.version