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