makefiles-cflag-cleanup-20030111
[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 et_lex.lex.c: et_lex.lex.l
13         $(RM) -f et_lex.lex.c
14         $(LEX) -t $(srcdir)/et_lex.lex.l > et_lex.lex.c
15
16 compile_et:     compile_et.o error_table.o
17         case $(SYS_NAME) in \
18         *_linux* ) \
19         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil;; \
20         * ) \
21         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil -ll;; \
22         esac
23
24 libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
25         $(RM) -f $@
26         $(AR) crv $@ error_msg.o et_name.o com_err.o AFS_component_version_number.o
27         $(RANLIB) $@
28 #
29 # Installation targets
30 #
31 install:  ${DESTDIR}${bindir}/compile_et ${DESTDIR}${includedir}/afs/com_err.h ${DESTDIR}${includedir}/afs/error_table.h ${DESTDIR}${includedir}/afs/mit-sipb-cr.h ${DESTDIR}${libdir}/afs/libcom_err.a
32
33 ${DEST}/bin/compile_et: compile_et
34         ${INSTALL} $? $@
35
36 ${DEST}/include/afs/com_err.h: com_err.h
37         ${INSTALL} $? $@
38
39 ${DEST}/include/afs/error_table.h: error_table.h 
40         ${INSTALL} $? $@
41
42 ${DEST}/include/afs/mit-sipb-cr.h: mit-sipb-cr.h
43         ${INSTALL} $? $@
44
45 ${DEST}/lib/afs/libcom_err.a: libcom_err.a
46         ${INSTALL} $? $@
47
48 clean:
49         $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
50                 *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libcom_err.a \
51                 com_err.o compile_et et.ar TAGS y.tab.c lex.yy.c error_table.c \
52                 et_lex.lex.c test1.h test1.c test2.h test2.c \
53                 eddep makedep core AFS_component_version_number.c
54
55 test:
56         cd test; $(MAKE)
57
58 compile_et.o:  AFS_component_version_number.c
59 error_table.o: et_lex.lex.c
60
61 include ../config/Makefile.version
62 ${DESTDIR}${bindir}/compile_et: compile_et
63         ${INSTALL} $? $@
64
65 ${DESTDIR}${includedir}/afs/com_err.h: com_err.h
66         ${INSTALL} $? $@
67
68 ${TOP_INCDIR}/afs/com_err.h: com_err.h
69         ${INSTALL} $? $@
70
71 ${DESTDIR}${includedir}/afs/error_table.h: error_table.h
72         ${INSTALL} $? $@
73
74 ${TOP_INCDIR}/afs/error_table.h: error_table.h
75         ${INSTALL} $? $@
76
77 ${DESTDIR}${includedir}/afs/mit-sipb-cr.h: mit-sipb-cr.h
78         ${INSTALL} $? $@
79
80 ${TOP_INCDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
81         ${INSTALL} $? $@
82
83 ${DESTDIR}${libdir}/afs/libcom_err.a: libcom_err.a
84         ${INSTALL} $? $@
85
86 ${TOP_LIBDIR}/libcom_err.a: libcom_err.a
87         ${INSTALL} $? $@
88
89 dest:  ${DEST}/bin/compile_et ${DEST}/include/afs/com_err.h ${DEST}/include/afs/error_table.h ${DEST}/include/afs/mit-sipb-cr.h ${DEST}/lib/afs/libcom_err.a
90