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