make-install-support-for-transarc-and-prefix-style-universes-20010907
[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 DEST=@DEST@
8 TOP_INCDIR=@TOP_INCDIR@
9 TOP_LIBDIR=@TOP_LIBDIR@
10 prefix=@prefix@
11 exec_prefix=@exec_prefix@
12 bindir=@bindir@
13 sbindir=@sbindir@
14 libexecdir=@libexecdir@
15 libdir=@libdir@
16 includedir=@includedir@
17 mandir=@mandir@
18 afssrvbindir=@afssrvbindir@
19 afssrvsbindir=@afssrvsbindir@
20 afssrvlibexecdir=@afssrvlibexecdir@
21 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
22 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
23 TOP_SRCDIR=@TOP_SRCDIR@
24 SYS_NAME=@AFS_SYSNAME@
25
26 SHELL = /bin/sh
27
28 include ../config/Makefile.${SYS_NAME}
29
30 UKERNELDIR=../libuafs/
31
32 CFLAGS=${OPTMZ} -I${TOP_INCDIR} -I${TOP_SRCDIR}/config ${XCFLAGS}
33
34 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
35
36 et_lex.lex.c: et_lex.lex.l
37         $(RM) -f et_lex.lex.c
38         $(LEX) -t et_lex.lex.l > et_lex.lex.c
39
40 compile_et:     compile_et.o error_table.o
41         case $(SYS_NAME) in \
42         *_linux* ) \
43         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil;; \
44         * ) \
45         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil -ll;; \
46         esac
47
48 libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
49         $(RM) -f $@
50         $(AR) crv $@ error_msg.o et_name.o com_err.o AFS_component_version_number.o
51         $(RANLIB) $@
52 #
53 # Installation targets
54 #
55 ukinstall: \
56         ${UKERNELDIR}/afs \
57         ${UKERNELDIR}/afs/com_err.c \
58         ${UKERNELDIR}/afs/com_err.h \
59         ${UKERNELDIR}/afs/error_msg.c \
60         ${UKERNELDIR}/afs/error_table.h \
61         ${UKERNELDIR}/afs/mit-sipb-cr.h \
62         ${UKERNELDIR}/afs/internal.h \
63         ${UKERNELDIR}/afs/et_name.c
64
65 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
66
67 ${UKERNELDIR}/afs:
68         mkdir -p $@
69
70 ${UKERNELDIR}/afs/com_err.c: com_err.c
71         ${INSTALL} $? $@
72
73 ${UKERNELDIR}/afs/com_err.h: com_err.h
74         ${INSTALL} $? $@
75
76 ${UKERNELDIR}/afs/error_msg.c: error_msg.c
77         ${INSTALL} $? $@
78
79 ${UKERNELDIR}/afs/error_table.h: error_table.h
80         ${INSTALL} $? $@
81
82 ${UKERNELDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
83         ${INSTALL} $? $@
84
85 ${UKERNELDIR}/afs/internal.h: internal.h
86         ${INSTALL} $? $@
87
88 ${UKERNELDIR}/afs/et_name.c: et_name.c
89         ${INSTALL} $? $@
90
91 ${DEST}/bin/compile_et: compile_et
92         ${INSTALL} $? $@
93
94 ${DEST}/include/afs/com_err.h: com_err.h
95         ${INSTALL} $? $@
96
97 ${DEST}/include/afs/error_table.h: error_table.h 
98         ${INSTALL} $? $@
99
100 ${DEST}/include/afs/mit-sipb-cr.h: mit-sipb-cr.h
101         ${INSTALL} $? $@
102
103 ${DEST}/lib/afs/libcom_err.a: libcom_err.a
104         ${INSTALL} $? $@
105
106 clean:
107         $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
108                 *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libcom_err.a \
109                 com_err.o compile_et et.ar TAGS y.tab.c lex.yy.c error_table.c \
110                 et_lex.lex.c test1.h test1.c test2.h test2.c \
111                 eddep makedep core AFS_component_version_number.c
112
113 test:
114         cd test; $(MAKE)
115
116 compile_et.o:  AFS_component_version_number.c
117 error_table.o: et_lex.lex.c
118
119 include ../config/Makefile.version
120 ${DESTDIR}${bindir}/compile_et: compile_et
121         ${INSTALL} $? $@
122
123 ${DESTDIR}${includedir}/afs/com_err.h: com_err.h
124         ${INSTALL} $? $@
125
126 ${TOP_INCDIR}/afs/com_err.h: com_err.h
127         ${INSTALL} $? $@
128
129 ${DESTDIR}${includedir}/afs/error_table.h: error_table.h
130         ${INSTALL} $? $@
131
132 ${TOP_INCDIR}/afs/error_table.h: error_table.h
133         ${INSTALL} $? $@
134
135 ${DESTDIR}${includedir}/afs/mit-sipb-cr.h: mit-sipb-cr.h
136         ${INSTALL} $? $@
137
138 ${TOP_INCDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
139         ${INSTALL} $? $@
140
141 ${DESTDIR}${libdir}/afs/libcom_err.a: libcom_err.a
142         ${INSTALL} $? $@
143
144 ${TOP_LIBDIR}/libcom_err.a: libcom_err.a
145         ${INSTALL} $? $@
146
147 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
148