8e502b425129da570058fdb4a877e45d43ef6785
[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 DEST=@DEST@
11 TOP_INCDIR=@TOP_INCDIR@
12 TOP_LIBDIR=@TOP_LIBDIR@
13 prefix=@prefix@
14 exec_prefix=@exec_prefix@
15 bindir=@bindir@
16 sbindir=@sbindir@
17 libexecdir=@libexecdir@
18 libdir=@libdir@
19 includedir=@includedir@
20 mandir=@mandir@
21 afssrvbindir=@afssrvbindir@
22 afssrvsbindir=@afssrvsbindir@
23 afssrvlibexecdir=@afssrvlibexecdir@
24 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
25 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
26 TOP_SRCDIR=@TOP_SRCDIR@
27 SYS_NAME=@AFS_SYSNAME@
28
29 SHELL = /bin/sh
30
31 include ../config/Makefile.${SYS_NAME}
32
33 CC=${MT_CC}
34 INCLUDES=-I${TOP_INCDIR} -I.. -I../rx
35 CFLAGS = ${OPTMZ} ${DBG} ${INCLUDES} -DRXDEBUG ${MT_CFLAGS} -I${TOP_SRCDIR}/config
36 SFLAGS=-P -I${TOP_INCDIR}
37 RX = ../rx
38 CCRULE = ${CC} ${CFLAGS} -c $?
39 RXKAD = ../rxkad
40 RXSTAT = ../rxstat
41 FSINT = ../fsint
42 DES = ../des
43 COMERR = ../comerr
44 UTIL = ../util
45 SYS = ../sys
46
47 SYSOBJS =\
48         syscall.o
49
50 UTILOBJS =\
51         casestrcpy.o \
52         base64.o
53
54 COMERROBJS =\
55         error_msg.o \
56         et_name.o \
57         com_err.o
58
59 XDROBJS =\
60         xdr_arrayn.o \
61         xdr_rx.o \
62         xdr_int64.o \
63         xdr_afsuuid.o \
64         AFS_component_version_number.o
65
66 RXOBJS =\
67         rx_event.o \
68         rx_user.o \
69         rx_pthread.o \
70         rx.o \
71         rx_null.o \
72         rx_conncache.o \
73         rx_globals.o \
74         rx_getaddr.o \
75         rx_misc.o \
76         rx_packet.o \
77         rx_rdwr.o \
78         rx_trace.o \
79         rx_multi.o
80
81 RXSTATOBJS =\
82         rxstat.o \
83         rxstat.ss.o \
84         rxstat.xdr.o \
85         rxstat.cs.o
86
87 FSINTOBJS =\
88         afsint.cs.o \
89         afsint.xdr.o \
90         afscbint.cs.o \
91         afscbint.xdr.o \
92         afsaux.o
93
94 RXKADOBJS =\
95         rxkad_client.o \
96         rxkad_server.o \
97         rxkad_common.o \
98         ticket.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 LIBOBJS = \
120         ${RXOBJS} \
121         ${DESOBJS} \
122         ${XDROBJS} \
123         ${RXKADOBJS} \
124         ${COMERROBJS} \
125         ${UTILOBJS} \
126         ${SYSOBJS} \
127         ${CRYPT_OBJ} \
128         ${RXSTATOBJS} \
129         ${FSINTOBJS}
130
131 all: ${TOP_LIBDIR}/libafsrpc.a
132
133 install: ${DESTDIR}${libdir}/libafsrpc.a
134
135 ${DEST}/lib/libafsrpc.a: libafsrpc.a
136         ${INSTALL} $? $@
137
138 libafsrpc.a: ${LIBOBJS}
139         $(RM) -f $@
140         $(AR) crv $@ ${LIBOBJS}
141         $(RANLIB) $@
142         case "${SYS_NAME}" in \
143             rs_aix*) \
144                 $(AR) crv $@ ../sys/afsl.exp;; \
145         esac
146
147 rx_event.o: ${RX}/rx_event.c
148         ${CCRULE};
149
150 rx_user.o: ${RX}/rx_user.c
151         ${CCRULE};
152
153 rx_pthread.o: ${RX}/rx_pthread.c
154         ${CCRULE};
155
156 rx.o: ${RX}/rx.c
157         ${CCRULE};
158
159 rx_conncache.o: ${RX}/rx_conncache.c
160         ${CCRULE};
161
162 rx_null.o: ${RX}/rx_null.c
163         ${CCRULE};
164
165 rx_globals.o: ${RX}/rx_globals.c
166         ${CCRULE};
167
168 rx_getaddr.o: ${RX}/rx_getaddr.c
169         ${CCRULE};
170
171 rx_misc.o: ${RX}/rx_misc.c
172         ${CCRULE};
173
174 rx_packet.o: ${RX}/rx_packet.c
175         ${CCRULE};
176
177 rx_rdwr.o: ${RX}/rx_rdwr.c
178         ${CCRULE};
179
180 rx_trace.o: ${RX}/rx_trace.c
181         ${CCRULE};
182
183 rx_multi.o: ${RX}/rx_multi.c
184         ${CCRULE};
185
186 rxkad_client.o: ${RXKAD}/rxkad_client.c
187         ${CCRULE};
188
189 rxkad_server.o: ${RXKAD}/rxkad_server.c
190         ${CCRULE};
191
192 rxkad_common.o: ${RXKAD}/rxkad_common.c
193         ${CCRULE};
194
195 ticket.o: ${RXKAD}/ticket.c
196         ${CCRULE};
197
198 fcrypt.o: ${RXKAD}/fcrypt.c
199         ${CCRULE};
200
201 crypt_conn.o: ${RXKAD}/crypt_conn.c
202         ${CCRULE};
203
204 AFS_component_version_number.o: ${RX}/AFS_component_version_number.c
205         ${CCRULE};
206
207 xdr.o: ${RX}/xdr.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*) \
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* ) \
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 ${DESTDIR}${libdir}/libafsrpc.a: libafsrpc.a
382         ${INSTALL} $? $@
383
384 ${TOP_LIBDIR}/libafsrpc.a: libafsrpc.a
385         ${INSTALL} $? $@
386
387 dest: ${DEST}/lib/libafsrpc.a
388