DEVEL15-cvsignore-happiness-20060801
[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         amd64_linux*) \
153                 ${SHLIB_LINKER} -Wl,-h,libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} -Wl,--version-script=${srcdir}/mapfile.afs_xdr -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
154         *_linux*) \
155                 ${SHLIB_LINKER} -Wl,-h,libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} -Wl,--version-script=${srcdir}/mapfile -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
156         *) \
157                 ${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
158         esac
159
160 rx_event.o: ${RX}/rx_event.c
161         ${CCRULE}
162
163 rx_user.o: ${RX}/rx_user.c
164         ${CCRULE}
165
166 rx_pthread.o: ${RX}/rx_pthread.c
167         ${CCRULE}
168
169 rx.o: ${RX}/rx.c
170         ${CCRULE}
171
172 rx_conncache.o: ${RX}/rx_conncache.c
173         ${CCRULE}
174
175 rx_null.o: ${RX}/rx_null.c
176         ${CCRULE}
177
178 rx_globals.o: ${RX}/rx_globals.c
179         ${CCRULE}
180
181 rx_getaddr.o: ${RX}/rx_getaddr.c
182         ${CCRULE}
183
184 rx_misc.o: ${RX}/rx_misc.c
185         ${CCRULE}
186
187 rx_packet.o: ${RX}/rx_packet.c
188         ${CCRULE}
189
190 rx_rdwr.o: ${RX}/rx_rdwr.c
191         ${CCRULE}
192
193 rx_trace.o: ${RX}/rx_trace.c
194         ${CCRULE}
195
196 rx_multi.o: ${RX}/rx_multi.c
197         ${CCRULE}
198
199 rxkad_client.o: ${RXKAD}/rxkad_client.c
200         ${CCRULE}
201
202 rxkad_server.o: ${RXKAD}/rxkad_server.c
203         ${CCRULE}
204
205 rxkad_common.o: ${RXKAD}/rxkad_common.c
206         ${CCRULE}
207
208 ticket.o: ${RXKAD}/ticket.c
209         ${CCRULE}
210
211 ticket5.o: ${RXKAD}/ticket5.c
212         ${CCRULE}
213
214 crc.o: ${RXKAD}/crc.c
215         ${CCRULE}
216
217 md4.o: ${RXKAD}/md4.c
218         ${CCRULE}
219
220 md5.o: ${RXKAD}/md5.c
221         ${CCRULE}
222
223 fcrypt.o: ${RXKAD}/domestic/fcrypt.c
224         ${CCRULE}
225
226 crypt_conn.o: ${RXKAD}/domestic/crypt_conn.c
227         ${CCRULE}
228
229 AFS_component_version_number.o: ${RX}/AFS_component_version_number.c
230         ${CCRULE}
231
232 xdr.o: ${RX}/xdr.c
233         ${CCRULE}
234
235 xdr_int32.o: ${RX}/xdr_int32.c
236         ${CCRULE}
237
238 xdr_int64.o: ${RX}/xdr_int64.c
239         ${CCRULE}
240
241 xdr_array.o: ${RX}/xdr_array.c
242         ${CCRULE}
243
244 xdr_arrayn.o: ${RX}/xdr_arrayn.c
245         ${CCRULE}
246
247 xdr_float.o: ${RX}/xdr_float.c
248         ${CCRULE}
249
250 xdr_mem.o: ${RX}/xdr_mem.c
251         ${CCRULE}
252
253 xdr_rec.o: ${RX}/xdr_rec.c
254         ${CCRULE}
255
256 xdr_refernce.o: ${RX}/xdr_refernce.c
257         ${CCRULE}
258
259 xdr_rx.o: ${RX}/xdr_rx.c
260         ${CCRULE}
261
262 xdr_update.o: ${RX}/xdr_update.c
263         ${CCRULE}
264
265 xdr_afsuuid.o: ${RX}/xdr_afsuuid.c
266         ${CCRULE}
267
268 # Note that the special case statement for compiling des.c is present
269 # simply to work around a compiler bug on HP-UX 11.0.  The symptom of
270 # the problem is that linking the pthread fileserver fails with messages
271 # such as
272 #
273 #   pxdb internal warning: cu[84]: SLT_SRCFILE[411] out of synch
274 #   Please contact your HP Support representative
275 #   pxdb internal warning: cu[84]: SLT_SRCFILE[442] out of synch
276 #   pxdb internal warning: cu[84]: SLT_SRCFILE[450] out of synch
277 #   pxdb internal warning: cu[84]: SLT_SRCFILE[529] out of synch
278 #   pxdb internal warning: cu[84]: SLT_SRCFILE[544] out of synch
279 #   ...
280 #   pxdb32: internal error. File won't be debuggable (still a valid executable)
281 #   *** Error exit code 10
282 #
283 # The problematic version of pxdb is:
284 #
285 #   $ what /opt/langtools/bin/pxdb32
286 #   /opt/langtools/bin/pxdb32:
287 #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision$
288 #
289 # The problem occurs when -g and -O are both used when compiling des.c.
290 # The simplest way to work around the problem is to leave out either -g or -O.
291 # Since des.c is relatively stable I've chosen to eliminate -g rather
292 # than take any hit in performance.
293
294 des.o: ${DES}/des.c
295         set -x; \
296         case ${SYS_NAME} in \
297         hp_ux11*) \
298                 set X `echo ${CCRULE} | sed s/-g//`; shift; \
299                 "$$@" \
300                 ;; \
301         *) \
302                 ${CCRULE} \
303                 ;; \
304         esac
305
306 crypt.o: ${DES}/crypt.c
307         ${CCRULE}
308
309 cbc_encrypt.o: ${DES}/cbc_encrypt.c
310         ${CCRULE}
311
312 pcbc_encrypt.o: ${DES}/pcbc_encrypt.c
313         ${CCRULE}
314
315 cksum.o: ${DES}/cksum.c
316         ${CCRULE}
317
318 new_rnd_key.o: ${DES}/new_rnd_key.c
319         ${CCRULE}
320
321 key_sched.o: ${DES}/key_sched.c
322         ${CCRULE}
323
324 debug_decl.o: ${DES}/debug_decl.c
325         ${CCRULE}
326
327 quad_cksum.o: ${DES}/quad_cksum.c
328         ${CCRULE}
329
330 key_parity.o: ${DES}/key_parity.c
331         ${CCRULE}
332
333 weak_key.o: ${DES}/weak_key.c
334         ${CCRULE}
335
336 strng_to_key.o: ${DES}/strng_to_key.c
337         ${CCRULE}
338
339 misc.o: ${DES}/misc.c
340         ${CCRULE}
341
342 util.o: ${DES}/util.c
343         ${CCRULE}
344
345 error_msg.o: ${COMERR}/error_msg.c
346         ${CCRULE}
347
348 et_name.o: ${COMERR}/et_name.c
349         ${CCRULE}
350
351 com_err.o: ${COMERR}/com_err.c
352         ${CCRULE}
353
354 casestrcpy.o: ${UTIL}/casestrcpy.c
355         ${CCRULE}
356
357 assert.o: ${UTIL}/assert.c
358         ${CCRULE}
359
360 base64.o: ${UTIL}/base64.c
361         ${CCRULE}
362
363 fasttime.o: ${LWP}/fasttime.c
364         ${CCRULE} ${LWP}/fasttime.c
365
366 syscall.o: ${SYS}/syscall.s
367         case "$(SYS_NAME)" in \
368              sun4x_5* | sunx86_5*) \
369                 /usr/ccs/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
370                 as -o syscall.o syscall.ss;             \
371                 $(RM) syscall.ss;;                              \
372          sgi_* | *_darwin_* ) \
373                 ${CC} ${CFLAGS} -c ${SYS}/syscall.s;;          \
374          alpha_dux?? ) \
375                 ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
376                 ${AS} -o syscall.o syscall.i; \
377                 $(RM) -f syscall.ss syscall.i;; \
378          *fbsd* ) \
379                 touch syscall.o ;; \
380          *) \
381                 /lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
382                 as -o syscall.o syscall.ss;             \
383                 $(RM) syscall.ss;;                              \
384         esac
385
386 rxstat.o: ${RXSTAT}/rxstat.c
387         ${CCRULE}
388
389 rxstat.cs.o: ${RXSTAT}/rxstat.cs.c
390         ${CCRULE}
391
392 rxstat.ss.o: ${RXSTAT}/rxstat.ss.c
393         ${CCRULE}
394
395 rxstat.xdr.o: ${RXSTAT}/rxstat.xdr.c
396         ${CCRULE}
397
398 afsint.cs.o: ${FSINT}/afsint.cs.c
399         ${CCRULE}
400
401 afsint.xdr.o: ${FSINT}/afsint.xdr.c
402         ${CCRULE}
403
404 afscbint.cs.o: ${FSINT}/afscbint.cs.c
405         ${CCRULE}
406
407 afscbint.xdr.o: ${FSINT}/afscbint.xdr.c
408         ${CCRULE}
409
410 afsaux.o: ${FSINT}/afsaux.c
411         ${CCRULE}
412
413 clean:
414         $(RM) -f *.o libafsrpc*
415
416 ${DESTDIR}${libdir}/${LIBAFSRPC}: ${LIBAFSRPC}
417         ${INSTALL} ${LIBAFSRPC} ${DESTDIR}${libdir}/${LIBAFSRPC}
418         -ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}
419         -ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}
420
421 ${TOP_LIBDIR}/${LIBAFSRPC}: ${LIBAFSRPC}
422         ${INSTALL} ${LIBAFSRPC} ${TOP_LIBDIR}/${LIBAFSRPC}
423         -ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}
424         -ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}
425
426 dest: ${DEST}/lib/${LIBAFSRPC}
427