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