make-install-support-for-transarc-and-prefix-style-universes-20010907
[openafs.git] / src / rx / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 DEST=@DEST@
9 TOP_INCDIR=@TOP_INCDIR@
10 TOP_LIBDIR=@TOP_LIBDIR@
11 prefix=@prefix@
12 exec_prefix=@exec_prefix@
13 bindir=@bindir@
14 sbindir=@sbindir@
15 libexecdir=@libexecdir@
16 libdir=@libdir@
17 includedir=@includedir@
18 mandir=@mandir@
19 afssrvbindir=@afssrvbindir@
20 afssrvsbindir=@afssrvsbindir@
21 afssrvlibexecdir=@afssrvlibexecdir@
22 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
23 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
24 TOP_SRCDIR=@TOP_SRCDIR@
25 SYS_NAME=@AFS_SYSNAME@
26 MKAFS_OSTYPE=@MKAFS_OSTYPE@
27
28 SHELL = /bin/sh
29
30 include ../config/Makefile.${SYS_NAME}
31
32 KERNELDIR = ../libafs/
33 UKERNELDIR = ../libuafs/
34
35 CFLAGS=${OPTMZ} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -DRXDEBUG ${XCFLAGS}
36
37 #
38 # Generic xdr objects (or, at least, xdr stuff that's not newly defined for rx).
39 # Really the xdr stuff should be in its own directory.
40 #
41 XDROBJS = xdr_arrayn.o xdr_rx.o xdr_afsuuid.o
42
43 RXOBJS = rx_clock.o rx_event.o rx_user.o rx_lwp.o rx.o rx_null.o rx_globals.o \
44         rx_getaddr.o rx_misc.o rx_packet.o rx_rdwr.o  rx_trace.o rx_conncache.o \
45         xdr_int64.o 
46
47 MULTIOBJS = rx_multi.o
48
49 LIBOBJS = ${RXOBJS} ${MULTIOBJS} ${XDROBJS}
50
51 LIBOBJS_djgpp = ${RXOBJS_djgpp} ${MULTIOBJS} ${XDROBJS_djgpp}
52
53 XDROBJS_djgpp = xdr.o xdr_rec.o xdr_stdio.o \
54         xdr_float.o  xdr_refernce.o  xdr_update.o \
55         xdr_array.o xdr_mem.o xdr_rx.o xdr_afsuuid.o
56
57 RXOBJS_djgpp = rx_clock.o rx_event.o rx_user.o rx_lwp.o rx.o rx_null.o rx_globals.o \
58                 rx_getaddr.o rx_misc.o rx_packet.o rx_rdwr.o  rx_trace.o rx_conncache.o \
59                 xdr_int64.o rx_xmit_nt.o
60
61 BASICINCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
62              rx_clock.h rx_queue.h rx_event.h
63
64 LIBS=librx.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libcmd.a \
65                ${TOP_LIBDIR}/util.a
66
67 KSRCS = rx.c rx.h rx_clock.c rx_clock.h rx_event.c rx_event.h \
68         rx_globals.c rx_globals.h rx_kernel.h rx_misc.h \
69         rx_null.c rx_null.h rx_queue.h rx_getaddr.c rx_packet.c rx_packet.h \
70         rx_multi.h rx_kcommon.h rx_kcommon.c \
71         xdr.c xdr.h xdr_array.c xdr_arrayn.c xdr_rx.c rx_misc.c rx_rdwr.c \
72         xdr_afsuuid.c rx_trace.h xdr_int64.c
73 UKSRCS = $(KSRCS) rx_conncache.c
74
75 all: includes kinstall ukinstall ${TOP_LIBDIR}/librx.a
76
77 RX_component_version_number.c: AFS_component_version_number.c
78         sed 's/cml_version/rx_cml_version/' <AFS_component_version_number.c >RX_component_version_number.c
79
80 RX_component_version_number.o: RX_component_version_number.c
81
82 ${RXOBJS}: ${BASICINCLS} rx.h rx_user.h rx_globals.h
83
84 ${MULTIOBJS}: rx.h rx_multi.h
85
86 ${XDROBJS}: xdr.h
87
88 rx_user.o: rx.h rx_user.h
89
90 rx_packet.o: rx_packet.c rx_packet.h
91
92 rx_rdwr.o: rx_rdwr.c rx.h
93
94 rx.o: rx.h rx_user.h
95
96 rx_conncache.o: rx.h
97
98 rx_trace.o: rx_trace.h 
99
100 rx_getaddr.o: rx.h rx_getaddr.c
101
102 rx_globals.o: rx.h rx_user.h rx_globals.h
103
104 xdr_rx.o: xdr.h rx.h
105
106 xdr_refernce.o: xdr_refernce.c xdr.h
107
108 librx.a: ${LIBOBJS} RX_component_version_number.o
109         -$(RM) -f $@
110         $(AR) crv $@ ${LIBOBJS} RX_component_version_number.o
111         $(RANLIB) $@
112
113 librx-djgpp.a: ${LIBOBJS_djgpp} RX_component_version_number.o
114         -$(RM) -f librx-djgpp.a
115         $(AR) crv librx-djgpp.a RX_component_version_number.o ${LIBOBJS_djgpp}
116         $(RANLIB) librx-djgpp.a
117
118 #
119 # Install targets
120 #
121 install:  ${DESTDIR}${libdir}/librx.a \
122         ${DESTDIR}${includedir}/rx/rx_packet.h \
123         ${DESTDIR}${includedir}/rx/rx.h \
124         ${DESTDIR}${includedir}/rx/rx_user.h \
125         ${DESTDIR}${includedir}/rx/rx_event.h \
126         ${DESTDIR}${includedir}/rx/rx_queue.h \
127         ${DESTDIR}${includedir}/rx/rx_globals.h \
128         ${DESTDIR}${includedir}/rx/rx_clock.h \
129         ${DESTDIR}${includedir}/rx/rx_multi.h \
130         ${DESTDIR}${includedir}/rx/rx_pthread.h \
131         ${DESTDIR}${includedir}/rx/rx_lwp.h \
132         ${DESTDIR}${includedir}/rx/rx_misc.h \
133         ${DESTDIR}${includedir}/rx/rx_null.h \
134         ${DESTDIR}${includedir}/rx/xdr.h
135
136 includes: \
137         ${TOP_INCDIR}/rx/rx_packet.h \
138         ${TOP_INCDIR}/rx/rx.h \
139         ${TOP_INCDIR}/rx/rx_user.h \
140         ${TOP_INCDIR}/rx/rx_event.h \
141         ${TOP_INCDIR}/rx/rx_queue.h \
142         ${TOP_INCDIR}/rx/rx_globals.h \
143         ${TOP_INCDIR}/rx/rx_clock.h \
144         ${TOP_INCDIR}/rx/rx_multi.h \
145         ${TOP_INCDIR}/rx/rx_pthread.h \
146         ${TOP_INCDIR}/rx/rx_lwp.h \
147         ${TOP_INCDIR}/rx/rx_misc.h \
148         ${TOP_INCDIR}/rx/rx_null.h \
149         ${TOP_INCDIR}/rx/xdr.h
150
151 kinstall: ${KERNELDIR}/rx
152         $(INSTALL) $(MKAFS_OSTYPE)/*.[ch] $(KERNELDIR)rx
153         $(INSTALL) $(KSRCS) $(KERNELDIR)rx
154
155 ukinstall: ${UKERNELDIR}/rx
156         $(INSTALL) $(UKSRCS) $(UKERNELDIR)rx
157         -$(INSTALL) UKERNEL/*.[ch] $(UKERNELDIR)rx
158
159 ${DEST}/include/rx/rx_packet.h: rx_packet.h
160         ${INSTALL} $? $@
161
162 ${DEST}/include/rx/rx.h: rx.h
163         ${INSTALL} $? $@
164
165 ${DEST}/include/rx/rx_user.h: rx_user.h
166         ${INSTALL} $? $@
167
168 ${DEST}/include/rx/rx_event.h: rx_event.h
169         ${INSTALL} $? $@
170
171 ${DEST}/include/rx/rx_queue.h: rx_queue.h
172         ${INSTALL} $? $@
173
174 ${DEST}/include/rx/rx_globals.h: rx_globals.h
175         ${INSTALL} $? $@
176
177 ${DEST}/include/rx/rx_clock.h: rx_clock.h
178         ${INSTALL} $? $@
179
180 ${DEST}/include/rx/rx_multi.h: rx_multi.h
181         ${INSTALL} $? $@
182
183 ${DEST}/include/rx/rx_pthread.h: rx_pthread.h
184         ${INSTALL} $? $@
185
186 ${DEST}/include/rx/rx_lwp.h: rx_lwp.h
187         ${INSTALL} $? $@
188
189 ${DEST}/include/rx/rx_misc.h: rx_misc.h
190         ${INSTALL} $? $@
191
192 ${DEST}/include/rx/rx_null.h: rx_null.h
193         ${INSTALL} $? $@
194
195 ${DEST}/include/rx/xdr.h: xdr.h
196         ${INSTALL} $? $@
197
198 ${UKERNELDIR}/rx:
199         mkdir -p ${UKERNELDIR}/rx
200
201 ${KERNELDIR}/rx:
202         mkdir -p ${KERNELDIR}/rx
203
204 install-djgpp: includes kinstall ukinstall librx-djgpp ${TOP_INCDIR}/rx/rx_xmit_nt.h ${TOP_LIBDIR}/librx-djgpp.a
205
206 ${DEST}/lib/librx.a: librx.a
207         ${INSTALL} $? $@
208
209 # rule will never be satisfied
210 ${DESTDIR}/lib/librx-djgpp.a: librx-djgpp.a
211         ${INSTALL} $? ${DESTDIR}/lib/librx.a
212
213 ${DESTDIR}/include/rx/rx_xmit_nt.h: rx_xmit_nt.h ${TOP_INCDIR}/rx
214         ${INSTALL} $? $@
215
216 #
217 # Misc. targets
218 #
219 clean:
220         $(RM) -f *.o *.a core *_component_version_number.c
221
222 include ../config/Makefile.version
223
224 ${DESTDIR}${libdir}/librx.a: librx.a
225         ${INSTALL} $? $@
226
227 ${TOP_LIBDIR}/librx.a: librx.a
228         ${INSTALL} $? $@
229
230 dest: ${DEST}/lib/librx.a \
231         ${DEST}/include/rx/rx_packet.h \
232         ${DEST}/include/rx/rx.h \
233         ${DEST}/include/rx/rx_user.h \
234         ${DEST}/include/rx/rx_event.h \
235         ${DEST}/include/rx/rx_queue.h \
236         ${DEST}/include/rx/rx_globals.h \
237         ${DEST}/include/rx/rx_clock.h \
238         ${DEST}/include/rx/rx_multi.h \
239         ${DEST}/include/rx/rx_pthread.h \
240         ${DEST}/include/rx/rx_lwp.h \
241         ${DEST}/include/rx/rx_misc.h \
242         ${DEST}/include/rx/rx_null.h \
243         ${DEST}/include/rx/xdr.h
244
245 ${DESTDIR}${includedir}/rx/rx_packet.h: rx_packet.h
246         ${INSTALL} $? $@
247
248 ${DESTDIR}${includedir}/rx/rx.h: rx.h
249         ${INSTALL} $? $@
250
251 ${DESTDIR}${includedir}/rx/rx_user.h: rx_user.h
252         ${INSTALL} $? $@
253
254 ${DESTDIR}${includedir}/rx/rx_event.h: rx_event.h
255         ${INSTALL} $? $@
256
257 ${DESTDIR}${includedir}/rx/rx_queue.h: rx_queue.h
258         ${INSTALL} $? $@
259
260 ${DESTDIR}${includedir}/rx/rx_globals.h: rx_globals.h
261         ${INSTALL} $? $@
262
263 ${DESTDIR}${includedir}/rx/rx_clock.h: rx_clock.h
264         ${INSTALL} $? $@
265
266 ${DESTDIR}${includedir}/rx/rx_multi.h: rx_multi.h
267         ${INSTALL} $? $@
268
269 ${DESTDIR}${includedir}/rx/rx_pthread.h: rx_pthread.h
270         ${INSTALL} $? $@
271
272 ${DESTDIR}${includedir}/rx/rx_lwp.h: rx_lwp.h
273         ${INSTALL} $? $@
274
275 ${DESTDIR}${includedir}/rx/rx_misc.h: rx_misc.h
276         ${INSTALL} $? $@
277
278 ${DESTDIR}${includedir}/rx/rx_null.h: rx_null.h
279         ${INSTALL} $? $@
280
281 ${DESTDIR}${includedir}/rx/xdr.h: xdr.h
282         ${INSTALL} $? $@
283
284
285 ${TOP_INCDIR}/rx/rx_packet.h: rx_packet.h
286         ${INSTALL} $? $@
287
288 ${TOP_INCDIR}/rx/rx.h: rx.h
289         ${INSTALL} $? $@
290
291 ${TOP_INCDIR}/rx/rx_user.h: rx_user.h
292         ${INSTALL} $? $@
293
294 ${TOP_INCDIR}/rx/rx_event.h: rx_event.h
295         ${INSTALL} $? $@
296
297 ${TOP_INCDIR}/rx/rx_queue.h: rx_queue.h
298         ${INSTALL} $? $@
299
300 ${TOP_INCDIR}/rx/rx_globals.h: rx_globals.h
301         ${INSTALL} $? $@
302
303 ${TOP_INCDIR}/rx/rx_clock.h: rx_clock.h
304         ${INSTALL} $? $@
305
306 ${TOP_INCDIR}/rx/rx_multi.h: rx_multi.h
307         ${INSTALL} $? $@
308
309 ${TOP_INCDIR}/rx/rx_pthread.h: rx_pthread.h
310         ${INSTALL} $? $@
311
312 ${TOP_INCDIR}/rx/rx_lwp.h: rx_lwp.h
313         ${INSTALL} $? $@
314
315 ${TOP_INCDIR}/rx/rx_misc.h: rx_misc.h
316         ${INSTALL} $? $@
317
318 ${TOP_INCDIR}/rx/rx_null.h: rx_null.h
319         ${INSTALL} $? $@
320
321 ${TOP_INCDIR}/rx/xdr.h: xdr.h
322         ${INSTALL} $? $@
323