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