build-system-specific-makefile-configuration-from-configure-20011031
[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 CFLAGS=${OPTMZ} -I${TOP_INCDIR} -I${TOP_OBJDIR}/src/config -I. -I${srcdir} ${XCFLAGS}
11
12 all: ukinstall 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
13
14 et_lex.lex.c: et_lex.lex.l
15         $(RM) -f et_lex.lex.c
16         $(LEX) -t $? > et_lex.lex.c
17
18 compile_et:     compile_et.o error_table.o
19         case $(SYS_NAME) in \
20         *_linux* ) \
21         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil;; \
22         * ) \
23         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil -ll;; \
24         esac
25
26 libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
27         $(RM) -f $@
28         $(AR) crv $@ error_msg.o et_name.o com_err.o AFS_component_version_number.o
29         $(RANLIB) $@
30 #
31 # Installation targets
32 #
33 ukinstall: \
34         ${UKERNELDIR}/afs \
35         ${UKERNELDIR}/afs/com_err.c \
36         ${UKERNELDIR}/afs/com_err.h \
37         ${UKERNELDIR}/afs/error_msg.c \
38         ${UKERNELDIR}/afs/error_table.h \
39         ${UKERNELDIR}/afs/mit-sipb-cr.h \
40         ${UKERNELDIR}/afs/internal.h \
41         ${UKERNELDIR}/afs/et_name.c
42
43 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
44
45 ${UKERNELDIR}/afs:
46         mkdir -p $@
47
48 ${UKERNELDIR}/afs/com_err.c: com_err.c
49         ${INSTALL} $? $@
50
51 ${UKERNELDIR}/afs/com_err.h: com_err.h
52         ${INSTALL} $? $@
53
54 ${UKERNELDIR}/afs/error_msg.c: error_msg.c
55         ${INSTALL} $? $@
56
57 ${UKERNELDIR}/afs/error_table.h: error_table.h
58         ${INSTALL} $? $@
59
60 ${UKERNELDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
61         ${INSTALL} $? $@
62
63 ${UKERNELDIR}/afs/internal.h: internal.h
64         ${INSTALL} $? $@
65
66 ${UKERNELDIR}/afs/et_name.c: et_name.c
67         ${INSTALL} $? $@
68
69 ${DEST}/bin/compile_et: compile_et
70         ${INSTALL} $? $@
71
72 ${DEST}/include/afs/com_err.h: com_err.h
73         ${INSTALL} $? $@
74
75 ${DEST}/include/afs/error_table.h: error_table.h 
76         ${INSTALL} $? $@
77
78 ${DEST}/include/afs/mit-sipb-cr.h: mit-sipb-cr.h
79         ${INSTALL} $? $@
80
81 ${DEST}/lib/afs/libcom_err.a: libcom_err.a
82         ${INSTALL} $? $@
83
84 clean:
85         $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
86                 *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libcom_err.a \
87                 com_err.o compile_et et.ar TAGS y.tab.c lex.yy.c error_table.c \
88                 et_lex.lex.c test1.h test1.c test2.h test2.c \
89                 eddep makedep core AFS_component_version_number.c
90
91 test:
92         cd test; $(MAKE)
93
94 compile_et.o:  AFS_component_version_number.c
95 error_table.o: et_lex.lex.c
96
97 include ../config/Makefile.version
98 ${DESTDIR}${bindir}/compile_et: compile_et
99         ${INSTALL} $? $@
100
101 ${DESTDIR}${includedir}/afs/com_err.h: com_err.h
102         ${INSTALL} $? $@
103
104 ${TOP_INCDIR}/afs/com_err.h: com_err.h
105         ${INSTALL} $? $@
106
107 ${DESTDIR}${includedir}/afs/error_table.h: error_table.h
108         ${INSTALL} $? $@
109
110 ${TOP_INCDIR}/afs/error_table.h: error_table.h
111         ${INSTALL} $? $@
112
113 ${DESTDIR}${includedir}/afs/mit-sipb-cr.h: mit-sipb-cr.h
114         ${INSTALL} $? $@
115
116 ${TOP_INCDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
117         ${INSTALL} $? $@
118
119 ${DESTDIR}${libdir}/afs/libcom_err.a: libcom_err.a
120         ${INSTALL} $? $@
121
122 ${TOP_LIBDIR}/libcom_err.a: libcom_err.a
123         ${INSTALL} $? $@
124
125 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
126