shlib-updates-20020909
[openafs.git] / src / shlibafsrpc / Makefile.in
1 # API version. When something changes, increment as appropriate. 
2 # Ignore at your own risk.
3 LIBAFSRPCMAJOR=1
4 LIBAFSRPCMINOR=0
5
6 # Copyright 2000, International Business Machines Corporation and others.
7 # All Rights Reserved.
8
9 # This software has been released under the terms of the IBM Public
10 # License.  For details, see the LICENSE file in the top-level source
11 # directory or online at http://www.openafs.org/dl/license10.html
12
13 # This is a pthread safe library containing rx, rxkad and des.
14
15 srcdir=@srcdir@
16 include @TOP_OBJDIR@/src/config/Makefile.config
17
18 CC=${MT_CC}
19 INCLUDES=-I. -I${srcdir} -I${TOP_INCDIR} -I.. -I${srcdir}/../rx -I${srcdir}../des -I../des \
20         -I../rxkad -I${srcdir}/../rxkad -I../rxstat -I../fsint
21 CFLAGS = ${OPTMZ} ${DBG} ${INCLUDES} -DRXDEBUG ${MT_CFLAGS} -I${TOP_OBJDIR}/src/config ${SHLIB_CFLAGS}
22 SFLAGS=-P -I${TOP_INCDIR}
23 RX = ../rx
24 CCRULE = ${CC} ${CFLAGS} -c $?
25 RXKAD = ../rxkad
26 RXSTAT = ../rxstat
27 FSINT = ../fsint
28 DES = ../des
29 COMERR = ../comerr
30 UTIL = ../util
31 SYS = ${srcdir}/../sys
32
33 SYSOBJS =\
34         syscall.o
35
36 UTILOBJS =\
37         casestrcpy.o \
38         base64.o
39
40 COMERROBJS =\
41         error_msg.o \
42         et_name.o \
43         com_err.o
44
45 XDROBJS =\
46         xdr.o \
47         xdr_array.o \
48         xdr_arrayn.o \
49         xdr_rx.o \
50         xdr_int32.o \
51         xdr_int64.o \
52         xdr_afsuuid.o \
53         AFS_component_version_number.o
54
55 RXOBJS =\
56         rx_event.o \
57         rx_user.o \
58         rx_pthread.o \
59         rx.o \
60         rx_null.o \
61         rx_conncache.o \
62         rx_globals.o \
63         rx_getaddr.o \
64         rx_misc.o \
65         rx_packet.o \
66         rx_rdwr.o \
67         rx_trace.o \
68         rx_multi.o
69
70 RXSTATOBJS =\
71         rxstat.o \
72         rxstat.ss.o \
73         rxstat.xdr.o \
74         rxstat.cs.o
75
76 FSINTOBJS =\
77         afsint.cs.o \
78         afsint.xdr.o \
79         afscbint.cs.o \
80         afscbint.xdr.o \
81         afsaux.o
82
83 RXKADOBJS =\
84         rxkad_client.o \
85         rxkad_server.o \
86         rxkad_common.o \
87         ticket.o \
88         fcrypt.o \
89         crypt_conn.o
90
91 DESOBJS =\
92         des.o \
93         cbc_encrypt.o \
94         pcbc_encrypt.o \
95         cksum.o \
96         new_rnd_key.o \
97         key_sched.o \
98         debug_decl.o \
99         quad_cksum.o \
100         key_parity.o \
101         weak_key.o \
102         strng_to_key.o \
103         misc.o \
104         util.o
105
106 CRYPT_OBJ = crypt.o
107
108 LIBOBJS = \
109         ${RXOBJS} \
110         ${DESOBJS} \
111         ${XDROBJS} \
112         ${RXKADOBJS} \
113         ${COMERROBJS} \
114         ${UTILOBJS} \
115         ${SYSOBJS} \
116         ${CRYPT_OBJ} \
117         ${RXSTATOBJS} \
118         ${FSINTOBJS}
119
120 LIBAFSRPC = libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}.${LIBAFSRPCMINOR}
121
122 all: ${TOP_LIBDIR}/${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}
123
124 install: ${DESTDIR}${libdir}/${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}
125
126 ${DEST}/lib/${LIBAFSRPC}: ${LIBAFSRPC}
127         ${INSTALL} ${LIBAFSRPC} ${DEST}/lib/${LIBAFSRPC}
128
129 ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}: ${DEST}/lib/${LIBAFSRPC}
130         -ln -f -s ${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}
131
132 ${LIBAFSRPC}: ${LIBOBJS}
133         case ${SYS_NAME} in \
134         rs_aix4*) \
135                 ${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} -bE:afsrpc.exp ${MT_LIBS};; \
136         sun*_5*) \
137                 ${SHLIB_LINKER} -h ${LIBAFSRPC} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
138         *) \
139                 ${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
140         esac
141
142 rx_event.o: ${RX}/rx_event.c
143         ${CCRULE}
144
145 rx_user.o: ${RX}/rx_user.c
146         ${CCRULE}
147
148 rx_pthread.o: ${RX}/rx_pthread.c
149         ${CCRULE}
150
151 rx.o: ${RX}/rx.c
152         ${CCRULE}
153
154 rx_conncache.o: ${RX}/rx_conncache.c
155         ${CCRULE}
156
157 rx_null.o: ${RX}/rx_null.c
158         ${CCRULE}
159
160 rx_globals.o: ${RX}/rx_globals.c
161         ${CCRULE}
162
163 rx_getaddr.o: ${RX}/rx_getaddr.c
164         ${CCRULE}
165
166 rx_misc.o: ${RX}/rx_misc.c
167         ${CCRULE}
168
169 rx_packet.o: ${RX}/rx_packet.c
170         ${CCRULE}
171
172 rx_rdwr.o: ${RX}/rx_rdwr.c
173         ${CCRULE}
174
175 rx_trace.o: ${RX}/rx_trace.c
176         ${CCRULE}
177
178 rx_multi.o: ${RX}/rx_multi.c
179         ${CCRULE}
180
181 rxkad_client.o: ${RXKAD}/rxkad_client.c
182         ${CCRULE}
183
184 rxkad_server.o: ${RXKAD}/rxkad_server.c
185         ${CCRULE}
186
187 rxkad_common.o: ${RXKAD}/rxkad_common.c
188         ${CCRULE}
189
190 ticket.o: ${RXKAD}/ticket.c
191         ${CCRULE}
192
193 fcrypt.o: ${RXKAD}/fcrypt.c
194         ${CCRULE}
195
196 crypt_conn.o: ${RXKAD}/crypt_conn.c
197         ${CCRULE}
198
199 AFS_component_version_number.o: ${RX}/AFS_component_version_number.c
200         ${CCRULE}
201
202 xdr.o: ${RX}/xdr.c
203         ${CCRULE}
204
205 xdr_int32.o: ${RX}/xdr_int32.c
206         ${CCRULE}
207
208 xdr_int64.o: ${RX}/xdr_int64.c
209         ${CCRULE}
210
211 xdr_array.o: ${RX}/xdr_array.c
212         ${CCRULE}
213
214 xdr_arrayn.o: ${RX}/xdr_arrayn.c
215         ${CCRULE}
216
217 xdr_float.o: ${RX}/xdr_float.c
218         ${CCRULE}
219
220 xdr_mem.o: ${RX}/xdr_mem.c
221         ${CCRULE}
222
223 xdr_rec.o: ${RX}/xdr_rec.c
224         ${CCRULE}
225
226 xdr_refernce.o: ${RX}/xdr_refernce.c
227         ${CCRULE}
228
229 xdr_rx.o: ${RX}/xdr_rx.c
230         ${CCRULE}
231
232 xdr_update.o: ${RX}/xdr_update.c
233         ${CCRULE}
234
235 xdr_afsuuid.o: ${RX}/xdr_afsuuid.c
236         ${CCRULE}
237
238 # Note that the special case statement for compiling des.c is present
239 # simply to work around a compiler bug on HP-UX 11.0.  The symptom of
240 # the problem is that linking the pthread fileserver fails with messages
241 # such as
242 #
243 #   pxdb internal warning: cu[84]: SLT_SRCFILE[411] out of synch
244 #   Please contact your HP Support representative
245 #   pxdb internal warning: cu[84]: SLT_SRCFILE[442] out of synch
246 #   pxdb internal warning: cu[84]: SLT_SRCFILE[450] out of synch
247 #   pxdb internal warning: cu[84]: SLT_SRCFILE[529] out of synch
248 #   pxdb internal warning: cu[84]: SLT_SRCFILE[544] out of synch
249 #   ...
250 #   pxdb32: internal error. File won't be debuggable (still a valid executable)
251 #   *** Error exit code 10
252 #
253 # The problematic version of pxdb is:
254 #
255 #   $ what /opt/langtools/bin/pxdb32
256 #   /opt/langtools/bin/pxdb32:
257 #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision$
258 #
259 # The problem occurs when -g and -O are both used when compiling des.c.
260 # The simplest way to work around the problem is to leave out either -g or -O.
261 # Since des.c is relatively stable I've chosen to eliminate -g rather
262 # than take any hit in performance.
263
264 des.o: ${DES}/des.c
265         set -x; \
266         case ${SYS_NAME} in \
267         hp_ux11*) \
268                 set X `echo ${CCRULE} | sed s/-g//`; shift; \
269                 "$$@" \
270                 ;; \
271         *) \
272                 ${CCRULE} \
273                 ;; \
274         esac
275
276 crypt.o: ${DES}/crypt.c
277         ${CCRULE}
278
279 cbc_encrypt.o: ${DES}/cbc_encrypt.c
280         ${CCRULE}
281
282 pcbc_encrypt.o: ${DES}/pcbc_encrypt.c
283         ${CCRULE}
284
285 cksum.o: ${DES}/cksum.c
286         ${CCRULE}
287
288 new_rnd_key.o: ${DES}/new_rnd_key.c
289         ${CCRULE}
290
291 key_sched.o: ${DES}/key_sched.c
292         ${CCRULE}
293
294 debug_decl.o: ${DES}/debug_decl.c
295         ${CCRULE}
296
297 quad_cksum.o: ${DES}/quad_cksum.c
298         ${CCRULE}
299
300 key_parity.o: ${DES}/key_parity.c
301         ${CCRULE}
302
303 weak_key.o: ${DES}/weak_key.c
304         ${CCRULE}
305
306 strng_to_key.o: ${DES}/strng_to_key.c
307         ${CCRULE}
308
309 misc.o: ${DES}/misc.c
310         ${CCRULE}
311
312 util.o: ${DES}/util.c
313         ${CCRULE}
314
315 error_msg.o: ${COMERR}/error_msg.c
316         ${CCRULE}
317
318 et_name.o: ${COMERR}/et_name.c
319         ${CCRULE}
320
321 com_err.o: ${COMERR}/com_err.c
322         ${CCRULE}
323
324 casestrcpy.o: ${UTIL}/casestrcpy.c
325         ${CCRULE}
326
327 base64.o: ${UTIL}/base64.c
328         ${CCRULE}
329
330 syscall.o: ${SYS}/syscall.s
331         case "$(SYS_NAME)" in \
332              sun4x_5* | sunx86_5*) \
333                 /usr/ccs/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
334                 as -o syscall.o syscall.ss;             \
335                 $(RM) syscall.ss;;                              \
336          sgi_* | ppc_darwin* ) \
337                 ${CC} ${CFLAGS} -c ${SYS}/syscall.s;;          \
338          alpha_dux?? ) \
339                 ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
340                 ${AS} -o syscall.o syscall.i; \
341                 $(RM) -f syscall.ss syscall.i;; \
342          *fbsd* ) \
343                 touch syscall.o ;; \
344          *) \
345                 /lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
346                 as -o syscall.o syscall.ss;             \
347                 $(RM) syscall.ss;;                              \
348         esac
349
350 rxstat.o: ${RXSTAT}/rxstat.c
351         ${CCRULE}
352
353 rxstat.cs.o: ${RXSTAT}/rxstat.cs.c
354         ${CCRULE}
355
356 rxstat.ss.o: ${RXSTAT}/rxstat.ss.c
357         ${CCRULE}
358
359 rxstat.xdr.o: ${RXSTAT}/rxstat.xdr.c
360         ${CCRULE}
361
362 afsint.cs.o: ${FSINT}/afsint.cs.c
363         ${CCRULE}
364
365 afsint.xdr.o: ${FSINT}/afsint.xdr.c
366         ${CCRULE}
367
368 afscbint.cs.o: ${FSINT}/afscbint.cs.c
369         ${CCRULE}
370
371 afscbint.xdr.o: ${FSINT}/afscbint.xdr.c
372         ${CCRULE}
373
374 afsaux.o: ${FSINT}/afsaux.c
375         ${CCRULE}
376
377 clean:
378         $(RM) -f *.o libafsrpc*
379
380 ${DESTDIR}${libdir}/${LIBAFSRPC}: ${LIBAFSRPC}
381         ${INSTALL} ${LIBAFSRPC} ${DESTDIR}${libdir}/${LIBAFSRPC}
382
383 ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}: ${DESTDIR}${libdir}/${LIBAFSRPC}
384         -ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}
385
386 ${TOP_LIBDIR}/${LIBAFSRPC}: ${LIBAFSRPC}
387         ${INSTALL} ${LIBAFSRPC} ${TOP_LIBDIR}/${LIBAFSRPC}
388
389 ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}: ${TOP_LIBDIR}/${LIBAFSRPC}
390         -ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}
391
392 dest: ${DEST}/lib/${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}
393