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