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