solaris-9-support-20020611
[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 INCLUDES=-I. -I${srcdir} -I${TOP_INCDIR} -I.. -I${srcdir}/../rx -I${srcdir}../des -I../des \
16         -I../rxkad -I${srcdir}/../rxkad -I../rxstat -I../fsint
17 CFLAGS = ${OPTMZ} ${DBG} ${INCLUDES} -DRXDEBUG ${MT_CFLAGS} -I${TOP_OBJDIR}/src/config
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_arrayn.o \
43         xdr_rx.o \
44         xdr_int64.o \
45         xdr_afsuuid.o \
46         AFS_component_version_number.o
47
48 RXOBJS =\
49         rx_event.o \
50         rx_user.o \
51         rx_pthread.o \
52         rx.o \
53         rx_null.o \
54         rx_conncache.o \
55         rx_globals.o \
56         rx_getaddr.o \
57         rx_misc.o \
58         rx_packet.o \
59         rx_rdwr.o \
60         rx_trace.o \
61         rx_multi.o
62
63 RXSTATOBJS =\
64         rxstat.o \
65         rxstat.ss.o \
66         rxstat.xdr.o \
67         rxstat.cs.o
68
69 FSINTOBJS =\
70         afsint.cs.o \
71         afsint.xdr.o \
72         afscbint.cs.o \
73         afscbint.xdr.o \
74         afsaux.o
75
76 RXKADOBJS =\
77         rxkad_client.o \
78         rxkad_server.o \
79         rxkad_common.o \
80         ticket.o \
81         fcrypt.o \
82         crypt_conn.o
83
84 DESOBJS =\
85         des.o \
86         cbc_encrypt.o \
87         pcbc_encrypt.o \
88         cksum.o \
89         new_rnd_key.o \
90         key_sched.o \
91         debug_decl.o \
92         quad_cksum.o \
93         key_parity.o \
94         weak_key.o \
95         strng_to_key.o \
96         misc.o \
97         util.o
98
99 CRYPT_OBJ = crypt.o
100
101 LIBOBJS = \
102         ${RXOBJS} \
103         ${DESOBJS} \
104         ${XDROBJS} \
105         ${RXKADOBJS} \
106         ${COMERROBJS} \
107         ${UTILOBJS} \
108         ${SYSOBJS} \
109         ${CRYPT_OBJ} \
110         ${RXSTATOBJS} \
111         ${FSINTOBJS}
112
113 all: ${TOP_LIBDIR}/libafsrpc.a
114
115 install: ${DESTDIR}${libdir}/libafsrpc.a
116
117 ${DEST}/lib/libafsrpc.a: libafsrpc.a
118         ${INSTALL} $? $@
119
120 libafsrpc.a: ${LIBOBJS}
121         $(RM) -f $@
122         $(AR) crv $@ ${LIBOBJS}
123         $(RANLIB) $@
124         case "${SYS_NAME}" in \
125             rs_aix*) \
126                 $(AR) crv $@ ${srcdir}/../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 misc.o: ${DES}/misc.c
294         ${CCRULE}
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*|sunx86_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*
363 ${DESTDIR}${libdir}/libafsrpc.a: libafsrpc.a
364         ${INSTALL} $? $@
365
366 ${TOP_LIBDIR}/libafsrpc.a: libafsrpc.a
367         ${INSTALL} $? $@
368
369 dest: ${DEST}/lib/libafsrpc.a
370