6c1eff55ac211aff7456c0ddd8439ec81d49dc90
[openafs.git] / src / comerr / Makefile.in
1 #
2 # Makefile for error-table routines
3 #
4 # Copyright 1987, 1989 MIT Student Information Processing Board
5 # For copyright info, see mit-sipb-cr.h.
6
7 srcdir=@srcdir@
8 include @TOP_OBJDIR@/src/config/Makefile.config
9
10 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
11
12 ${TOP_INCDIR}/afs/com_err.h: com_err.h
13         ${INSTALL_DATA} $? $@
14
15 ${TOP_INCDIR}/afs/error_table.h: error_table.h
16         ${INSTALL_DATA} $? $@
17
18 ${TOP_INCDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
19         ${INSTALL_DATA} $? $@
20
21 ${TOP_LIBDIR}/libcom_err.a: libcom_err.a
22         ${INSTALL_DATA} $? $@
23
24 et_lex.lex.c: et_lex.lex.l
25         $(RM) -f et_lex.lex.c
26         $(LEX) -t $(srcdir)/et_lex.lex.l > et_lex.lex.c
27
28 compile_et:     compile_et.o error_table.o
29         case $(SYS_NAME) in \
30         *_linux* | *_umlinux* ) \
31         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil;; \
32         * ) \
33         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil -ll;; \
34         esac
35
36 libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
37         $(RM) -f $@
38         $(AR) crv $@ error_msg.o et_name.o com_err.o AFS_component_version_number.o
39         $(RANLIB) $@
40
41 #
42 # Installation targets
43 #
44 install: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
45         ${INSTALL} -d ${DESTDIR}${bindir}
46         ${INSTALL} -d ${DESTDIR}${includedir}/afs
47         ${INSTALL} -d ${DESTDIR}${libdir}/afs
48         ${INSTALL_PROGRAM} compile_et ${DESTDIR}${bindir}/compile_et
49         ${INSTALL_DATA} com_err.h ${DESTDIR}${includedir}/afs/com_err.h
50         ${INSTALL_DATA} error_table.h ${DESTDIR}${includedir}/afs/error_table.h
51         ${INSTALL_DATA} mit-sipb-cr.h ${DESTDIR}${includedir}/afs/mit-sipb-cr.h
52         ${INSTALL_DATA} libcom_err.a ${DESTDIR}${libdir}/afs/libcom_err.a
53
54 dest: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
55         ${INSTALL} -d ${DEST}/bin
56         ${INSTALL} -d ${DEST}/include/afs
57         ${INSTALL} -d ${DEST}/lib/afs
58         ${INSTALL_PROGRAM} compile_et ${DEST}/bin/compile_et
59         ${INSTALL_DATA} com_err.h ${DEST}/include/afs/com_err.h
60         ${INSTALL_DATA} error_table.h ${DEST}/include/afs/error_table.h
61         ${INSTALL_DATA} mit-sipb-cr.h ${DEST}/include/afs/mit-sipb-cr.h
62         ${INSTALL_DATA} libcom_err.a ${DEST}/lib/afs/libcom_err.a
63
64 clean:
65         $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
66                 *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libcom_err.a \
67                 com_err.o compile_et et.ar TAGS y.tab.c lex.yy.c error_table.c \
68                 et_lex.lex.c test1.h test1.c test2.h test2.c \
69                 eddep makedep core AFS_component_version_number.c
70
71 test:
72         cd test; $(MAKE)
73
74 compile_et.o:  AFS_component_version_number.c
75 error_table.o: et_lex.lex.c
76
77 include ../config/Makefile.version