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
10 INSTALL_DATA = @INSTALL_DATA@
11 INSTALL_PROGRAM = @INSTALL_PROGRAM@
12 INSTALL_SCRIPT = @INSTALL_SCRIPT@
14 all: compile_et ${TOP_INCDIR}/afs/com_err.h ${TOP_INCDIR}/afs/error_table.h ${TOP_INCDIR}/afs/mit-sipb-cr.h ${TOP_LIBDIR}/libcom_err.a
16 buildtools: compile_et
18 ${TOP_INCDIR}/afs/com_err.h: com_err.h
21 ${TOP_INCDIR}/afs/error_table.h: error_table.h
24 ${TOP_INCDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
27 ${TOP_LIBDIR}/libcom_err.a: libcom_err.a
30 et_lex.lex.c: et_lex.lex.l
32 $(LEX) -t $(srcdir)/et_lex.lex.l > et_lex.lex.c
34 compile_et: compile_et.o error_table.o
36 *_linux* | *_umlinux* ) \
37 ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil;; \
39 ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil -ll;; \
42 libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
44 $(AR) crv $@ error_msg.o et_name.o com_err.o AFS_component_version_number.o
48 # When we build this file, we're using a .c file that's in the object directory,
49 # so we need to add the source directory to the includes to pick up local headers.
51 error_table.o: error_table.c
52 $(CC) $(CFLAGS) -I${srcdir} @CFLAGS_NOUNUSED@ -c $<
55 # Installation targets
57 install: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
58 ${INSTALL} -d ${DESTDIR}${bindir}
59 ${INSTALL} -d ${DESTDIR}${includedir}/afs
60 ${INSTALL} -d ${DESTDIR}${libdir}/afs
61 ${INSTALL_PROGRAM} compile_et ${DESTDIR}${bindir}/afs_compile_et
62 ${INSTALL_DATA} com_err.h ${DESTDIR}${includedir}/afs/com_err.h
63 ${INSTALL_DATA} error_table.h ${DESTDIR}${includedir}/afs/error_table.h
64 ${INSTALL_DATA} mit-sipb-cr.h ${DESTDIR}${includedir}/afs/mit-sipb-cr.h
65 ${INSTALL_DATA} libcom_err.a ${DESTDIR}${libdir}/afs/libcom_err.a
67 dest: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
68 ${INSTALL} -d ${DEST}/bin
69 ${INSTALL} -d ${DEST}/include/afs
70 ${INSTALL} -d ${DEST}/lib/afs
71 ${INSTALL_PROGRAM} compile_et ${DEST}/bin/afs_compile_et
72 ${INSTALL_DATA} com_err.h ${DEST}/include/afs/com_err.h
73 ${INSTALL_DATA} error_table.h ${DEST}/include/afs/error_table.h
74 ${INSTALL_DATA} mit-sipb-cr.h ${DEST}/include/afs/mit-sipb-cr.h
75 ${INSTALL_DATA} libcom_err.a ${DEST}/lib/afs/libcom_err.a
78 $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
79 *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libcom_err.a \
80 com_err.o compile_et et.ar TAGS y.tab.c lex.yy.c error_table.c \
81 et_lex.lex.c test1.h test1.c test2.h test2.c \
82 eddep makedep core AFS_component_version_number.c
87 compile_et.o: AFS_component_version_number.c
88 error_table.o: et_lex.lex.c
90 include ../config/Makefile.version