makefiles-cflag-cleanup-20030111
[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 rxkad_client.o: ${RXKAD}/rxkad_client.c
176         ${CCRULE}
177
178 rxkad_server.o: ${RXKAD}/rxkad_server.c
179         ${CCRULE}
180
181 rxkad_common.o: ${RXKAD}/rxkad_common.c
182         ${CCRULE}
183
184 ticket.o: ${RXKAD}/ticket.c
185         ${CCRULE}
186
187 ticket5.o: ${RXKAD}/ticket5.c
188         ${CCRULE}
189
190 crc.o: ${RXKAD}/crc.c
191         ${CCRULE}
192
193 fcrypt.o: ${RXKAD}/fcrypt.c
194         ${CCRULE}
195
196 crypt_conn.o: ${RXKAD}/crypt_conn.c
197         ${CCRULE}
198
199 AFS_component_version_number.o: ${RX}/AFS_component_version_number.c
200         ${CCRULE}
201
202 xdr.o: ${RX}/xdr.c
203         ${CCRULE}
204
205 xdr_int32.o: ${RX}/xdr_int32.c
206         ${CCRULE}
207
208 xdr_int64.o: ${RX}/xdr_int64.c
209         ${CCRULE}
210
211 xdr_array.o: ${RX}/xdr_array.c
212         ${CCRULE}
213
214 xdr_arrayn.o: ${RX}/xdr_arrayn.c
215         ${CCRULE}
216
217 xdr_float.o: ${RX}/xdr_float.c
218         ${CCRULE}
219
220 xdr_mem.o: ${RX}/xdr_mem.c
221         ${CCRULE}
222
223 xdr_rec.o: ${RX}/xdr_rec.c
224         ${CCRULE}
225
226 xdr_refernce.o: ${RX}/xdr_refernce.c
227         ${CCRULE}
228
229 xdr_rx.o: ${RX}/xdr_rx.c
230         ${CCRULE}
231
232 xdr_update.o: ${RX}/xdr_update.c
233         ${CCRULE}
234
235 xdr_afsuuid.o: ${RX}/xdr_afsuuid.c
236         ${CCRULE}
237
238 # Note that the special case statement for compiling des.c is present
239 # simply to work around a compiler bug on HP-UX 11.0.  The symptom of
240 # the problem is that linking the pthread fileserver fails with messages
241 # such as
242 #
243 #   pxdb internal warning: cu[84]: SLT_SRCFILE[411] out of synch
244 #   Please contact your HP Support representative
245 #   pxdb internal warning: cu[84]: SLT_SRCFILE[442] out of synch
246 #   pxdb internal warning: cu[84]: SLT_SRCFILE[450] out of synch
247 #   pxdb internal warning: cu[84]: SLT_SRCFILE[529] out of synch
248 #   pxdb internal warning: cu[84]: SLT_SRCFILE[544] out of synch
249 #   ...
250 #   pxdb32: internal error. File won't be debuggable (still a valid executable)
251 #   *** Error exit code 10
252 #
253 # The problematic version of pxdb is:
254 #
255 #   $ what /opt/langtools/bin/pxdb32
256 #   /opt/langtools/bin/pxdb32:
257 #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision$
258 #
259 # The problem occurs when -g and -O are both used when compiling des.c.
260 # The simplest way to work around the problem is to leave out either -g or -O.
261 # Since des.c is relatively stable I've chosen to eliminate -g rather
262 # than take any hit in performance.
263
264 des.o: ${DES}/des.c
265         set -x; \
266         case ${SYS_NAME} in \
267         hp_ux11*) \
268                 set X `echo ${CCRULE} | sed s/-g//`; shift; \
269                 "$$@" \
270                 ;; \
271         *) \
272                 ${CCRULE} \
273                 ;; \
274         esac
275
276 crypt.o: ${DES}/crypt.c
277         ${CCRULE}
278
279 cbc_encrypt.o: ${DES}/cbc_encrypt.c
280         ${CCRULE}
281
282 pcbc_encrypt.o: ${DES}/pcbc_encrypt.c
283         ${CCRULE}
284
285 cksum.o: ${DES}/cksum.c
286         ${CCRULE}
287
288 new_rnd_key.o: ${DES}/new_rnd_key.c
289         ${CCRULE}
290
291 key_sched.o: ${DES}/key_sched.c
292         ${CCRULE}
293
294 debug_decl.o: ${DES}/debug_decl.c
295         ${CCRULE}
296
297 quad_cksum.o: ${DES}/quad_cksum.c
298         ${CCRULE}
299
300 key_parity.o: ${DES}/key_parity.c
301         ${CCRULE}
302
303 weak_key.o: ${DES}/weak_key.c
304         ${CCRULE}
305
306 strng_to_key.o: ${DES}/strng_to_key.c
307         ${CCRULE}
308
309 misc.o: ${DES}/misc.c
310         ${CCRULE}
311
312 util.o: ${DES}/util.c
313         ${CCRULE}
314
315 error_msg.o: ${COMERR}/error_msg.c
316         ${CCRULE}
317
318 et_name.o: ${COMERR}/et_name.c
319         ${CCRULE}
320
321 com_err.o: ${COMERR}/com_err.c
322         ${CCRULE}
323
324 casestrcpy.o: ${UTIL}/casestrcpy.c
325         ${CCRULE}
326
327 base64.o: ${UTIL}/base64.c
328         ${CCRULE}
329
330 syscall.o: ${SYS}/syscall.s
331         case "$(SYS_NAME)" in \
332              sun4x_5* | sunx86_5*) \
333                 /usr/ccs/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
334                 as -o syscall.o syscall.ss;             \
335                 $(RM) syscall.ss;;                              \
336          sgi_* | ppc_darwin* ) \
337                 ${CC} ${CFLAGS} -c ${SYS}/syscall.s;;          \
338          alpha_dux?? ) \
339                 ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
340                 ${AS} -o syscall.o syscall.i; \
341                 $(RM) -f syscall.ss syscall.i;; \
342          *fbsd* ) \
343                 touch syscall.o ;; \
344          *) \
345                 /lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
346                 as -o syscall.o syscall.ss;             \
347                 $(RM) syscall.ss;;                              \
348         esac
349
350 rxstat.o: ${RXSTAT}/rxstat.c
351         ${CCRULE}
352
353 rxstat.cs.o: ${RXSTAT}/rxstat.cs.c
354         ${CCRULE}
355
356 rxstat.ss.o: ${RXSTAT}/rxstat.ss.c
357         ${CCRULE}
358
359 rxstat.xdr.o: ${RXSTAT}/rxstat.xdr.c
360         ${CCRULE}
361
362 afsint.cs.o: ${FSINT}/afsint.cs.c
363         ${CCRULE}
364
365 afsint.xdr.o: ${FSINT}/afsint.xdr.c
366         ${CCRULE}
367
368 afscbint.cs.o: ${FSINT}/afscbint.cs.c
369         ${CCRULE}
370
371 afscbint.xdr.o: ${FSINT}/afscbint.xdr.c
372         ${CCRULE}
373
374 afsaux.o: ${FSINT}/afsaux.c
375         ${CCRULE}
376
377 clean:
378         $(RM) -f *.o libafsrpc*
379
380 ${DESTDIR}${libdir}/libafsrpc.a: libafsrpc.a
381         ${INSTALL} $? $@
382
383 ${TOP_LIBDIR}/libafsrpc.a: libafsrpc.a
384         ${INSTALL} $? $@
385
386 dest: ${DEST}/lib/libafsrpc.a
387