shared-libafsrpc-and-libafsauthent-20020828
[openafs.git] / src / shlibafsrpc / Makefile.in
1 # API version. When something changes, increment as appropriate. 
2 # Ignore at your own risk.
3 LIBAFSRPCMAJOR=1
4 LIBAFSRPCMINOR=0
5
6 # Copyright 2000, International Business Machines Corporation and others.
7 # All Rights Reserved.
8
9 # This software has been released under the terms of the IBM Public
10 # License.  For details, see the LICENSE file in the top-level source
11 # directory or online at http://www.openafs.org/dl/license10.html
12
13 # This is a pthread safe library containing rx, rxkad and des.
14
15 srcdir=@srcdir@
16 include @TOP_OBJDIR@/src/config/Makefile.config
17
18 CC=${MT_CC}
19 INCLUDES=-I. -I${srcdir} -I${TOP_INCDIR} -I.. -I${srcdir}/../rx -I${srcdir}../des -I../des \
20         -I../rxkad -I${srcdir}/../rxkad -I../rxstat -I../fsint
21 CFLAGS = ${OPTMZ} ${DBG} ${INCLUDES} -DRXDEBUG ${MT_CFLAGS} -I${TOP_OBJDIR}/src/config ${SHLIB_CFLAGS}
22 SFLAGS=-P -I${TOP_INCDIR}
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 = ${srcdir}/../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.o \
47         xdr_array.o \
48         xdr_arrayn.o \
49         xdr_rx.o \
50         xdr_int32.o \
51         xdr_int64.o \
52         xdr_afsuuid.o \
53         AFS_component_version_number.o
54
55 RXOBJS =\
56         rx_event.o \
57         rx_user.o \
58         rx_pthread.o \
59         rx.o \
60         rx_null.o \
61         rx_conncache.o \
62         rx_globals.o \
63         rx_getaddr.o \
64         rx_misc.o \
65         rx_packet.o \
66         rx_rdwr.o \
67         rx_trace.o \
68         rx_multi.o
69
70 RXSTATOBJS =\
71         rxstat.o \
72         rxstat.ss.o \
73         rxstat.xdr.o \
74         rxstat.cs.o
75
76 FSINTOBJS =\
77         afsint.cs.o \
78         afsint.xdr.o \
79         afscbint.cs.o \
80         afscbint.xdr.o \
81         afsaux.o
82
83 RXKADOBJS =\
84         rxkad_client.o \
85         rxkad_server.o \
86         rxkad_common.o \
87         ticket.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 LIBAFSRPC = libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}.${LIBAFSRPCMINOR}
121
122 all: ${TOP_LIBDIR}/${LIBAFSRPC}
123
124 install: ${DESTDIR}${libdir}/${LIBAFSRPC}
125
126 ${DEST}${libdir}/libafsrpc.${SHLIB_SUFFIX}: ${LIBAFSRPC}
127         ${INSTALL} ${LIBAFSRPC} ${DEST}${libdir}/${LIBAFSRPC}
128         -ln -f -s ${LIBAFSRPC} ${DEST}${libdir}/libafsrpc.${SHLIB_SUFFIX}
129
130 ${LIBAFSRPC}: ${LIBOBJS}
131         case ${SYS_NAME} in \
132         rs_aix4*) \
133                 ${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} -bE:afsrpc.exp ${MT_LIBS};; \
134         sun*_5*) \
135                 ${SHLIB_LINKER} -h ${LIBAFSRPC} -o ${LIBAFSRPC} ${MT_LIBS};; \
136         *) \
137                 ${SHLIB_LINKER} -o ${LIBAFSRPC} ${MT_LIBS};; \
138         esac
139
140 rx_event.o: ${RX}/rx_event.c
141         ${CCRULE}
142
143 rx_user.o: ${RX}/rx_user.c
144         ${CCRULE}
145
146 rx_pthread.o: ${RX}/rx_pthread.c
147         ${CCRULE}
148
149 rx.o: ${RX}/rx.c
150         ${CCRULE}
151
152 rx_conncache.o: ${RX}/rx_conncache.c
153         ${CCRULE}
154
155 rx_null.o: ${RX}/rx_null.c
156         ${CCRULE}
157
158 rx_globals.o: ${RX}/rx_globals.c
159         ${CCRULE}
160
161 rx_getaddr.o: ${RX}/rx_getaddr.c
162         ${CCRULE}
163
164 rx_misc.o: ${RX}/rx_misc.c
165         ${CCRULE}
166
167 rx_packet.o: ${RX}/rx_packet.c
168         ${CCRULE}
169
170 rx_rdwr.o: ${RX}/rx_rdwr.c
171         ${CCRULE}
172
173 rx_trace.o: ${RX}/rx_trace.c
174         ${CCRULE}
175
176 rx_multi.o: ${RX}/rx_multi.c
177         ${CCRULE}
178
179 rxkad_client.o: ${RXKAD}/rxkad_client.c
180         ${CCRULE}
181
182 rxkad_server.o: ${RXKAD}/rxkad_server.c
183         ${CCRULE}
184
185 rxkad_common.o: ${RXKAD}/rxkad_common.c
186         ${CCRULE}
187
188 ticket.o: ${RXKAD}/ticket.c
189         ${CCRULE}
190
191 fcrypt.o: ${RXKAD}/fcrypt.c
192         ${CCRULE}
193
194 crypt_conn.o: ${RXKAD}/crypt_conn.c
195         ${CCRULE}
196
197 AFS_component_version_number.o: ${RX}/AFS_component_version_number.c
198         ${CCRULE}
199
200 xdr.o: ${RX}/xdr.c
201         ${CCRULE}
202
203 xdr_int32.o: ${RX}/xdr_int32.c
204         ${CCRULE}
205
206 xdr_int64.o: ${RX}/xdr_int64.c
207         ${CCRULE}
208
209 xdr_array.o: ${RX}/xdr_array.c
210         ${CCRULE}
211
212 xdr_arrayn.o: ${RX}/xdr_arrayn.c
213         ${CCRULE}
214
215 xdr_float.o: ${RX}/xdr_float.c
216         ${CCRULE}
217
218 xdr_mem.o: ${RX}/xdr_mem.c
219         ${CCRULE}
220
221 xdr_rec.o: ${RX}/xdr_rec.c
222         ${CCRULE}
223
224 xdr_refernce.o: ${RX}/xdr_refernce.c
225         ${CCRULE}
226
227 xdr_rx.o: ${RX}/xdr_rx.c
228         ${CCRULE}
229
230 xdr_update.o: ${RX}/xdr_update.c
231         ${CCRULE}
232
233 xdr_afsuuid.o: ${RX}/xdr_afsuuid.c
234         ${CCRULE}
235
236 # Note that the special case statement for compiling des.c is present
237 # simply to work around a compiler bug on HP-UX 11.0.  The symptom of
238 # the problem is that linking the pthread fileserver fails with messages
239 # such as
240 #
241 #   pxdb internal warning: cu[84]: SLT_SRCFILE[411] out of synch
242 #   Please contact your HP Support representative
243 #   pxdb internal warning: cu[84]: SLT_SRCFILE[442] out of synch
244 #   pxdb internal warning: cu[84]: SLT_SRCFILE[450] out of synch
245 #   pxdb internal warning: cu[84]: SLT_SRCFILE[529] out of synch
246 #   pxdb internal warning: cu[84]: SLT_SRCFILE[544] out of synch
247 #   ...
248 #   pxdb32: internal error. File won't be debuggable (still a valid executable)
249 #   *** Error exit code 10
250 #
251 # The problematic version of pxdb is:
252 #
253 #   $ what /opt/langtools/bin/pxdb32
254 #   /opt/langtools/bin/pxdb32:
255 #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision$
256 #
257 # The problem occurs when -g and -O are both used when compiling des.c.
258 # The simplest way to work around the problem is to leave out either -g or -O.
259 # Since des.c is relatively stable I've chosen to eliminate -g rather
260 # than take any hit in performance.
261
262 des.o: ${DES}/des.c
263         set -x; \
264         case ${SYS_NAME} in \
265         hp_ux11*) \
266                 set X `echo ${CCRULE} | sed s/-g//`; shift; \
267                 "$$@" \
268                 ;; \
269         *) \
270                 ${CCRULE} \
271                 ;; \
272         esac
273
274 crypt.o: ${DES}/crypt.c
275         ${CCRULE}
276
277 cbc_encrypt.o: ${DES}/cbc_encrypt.c
278         ${CCRULE}
279
280 pcbc_encrypt.o: ${DES}/pcbc_encrypt.c
281         ${CCRULE}
282
283 cksum.o: ${DES}/cksum.c
284         ${CCRULE}
285
286 new_rnd_key.o: ${DES}/new_rnd_key.c
287         ${CCRULE}
288
289 key_sched.o: ${DES}/key_sched.c
290         ${CCRULE}
291
292 debug_decl.o: ${DES}/debug_decl.c
293         ${CCRULE}
294
295 quad_cksum.o: ${DES}/quad_cksum.c
296         ${CCRULE}
297
298 key_parity.o: ${DES}/key_parity.c
299         ${CCRULE}
300
301 weak_key.o: ${DES}/weak_key.c
302         ${CCRULE}
303
304 strng_to_key.o: ${DES}/strng_to_key.c
305         ${CCRULE}
306
307 misc.o: ${DES}/misc.c
308         ${CCRULE}
309
310 util.o: ${DES}/util.c
311         ${CCRULE}
312
313 error_msg.o: ${COMERR}/error_msg.c
314         ${CCRULE}
315
316 et_name.o: ${COMERR}/et_name.c
317         ${CCRULE}
318
319 com_err.o: ${COMERR}/com_err.c
320         ${CCRULE}
321
322 casestrcpy.o: ${UTIL}/casestrcpy.c
323         ${CCRULE}
324
325 base64.o: ${UTIL}/base64.c
326         ${CCRULE}
327
328 syscall.o: ${SYS}/syscall.s
329         case "$(SYS_NAME)" in \
330              sun4x_5* | sunx86_5*) \
331                 /usr/ccs/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
332                 as -o syscall.o syscall.ss;             \
333                 $(RM) syscall.ss;;                              \
334          sgi_* | ppc_darwin* ) \
335                 ${CC} ${CFLAGS} -c ${SYS}/syscall.s;;          \
336          alpha_dux?? ) \
337                 ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
338                 ${AS} -o syscall.o syscall.i; \
339                 $(RM) -f syscall.ss syscall.i;; \
340          *fbsd* ) \
341                 touch syscall.o ;; \
342          *) \
343                 /lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
344                 as -o syscall.o syscall.ss;             \
345                 $(RM) syscall.ss;;                              \
346         esac
347
348 rxstat.o: ${RXSTAT}/rxstat.c
349         ${CCRULE}
350
351 rxstat.cs.o: ${RXSTAT}/rxstat.cs.c
352         ${CCRULE}
353
354 rxstat.ss.o: ${RXSTAT}/rxstat.ss.c
355         ${CCRULE}
356
357 rxstat.xdr.o: ${RXSTAT}/rxstat.xdr.c
358         ${CCRULE}
359
360 afsint.cs.o: ${FSINT}/afsint.cs.c
361         ${CCRULE}
362
363 afsint.xdr.o: ${FSINT}/afsint.xdr.c
364         ${CCRULE}
365
366 afscbint.cs.o: ${FSINT}/afscbint.cs.c
367         ${CCRULE}
368
369 afscbint.xdr.o: ${FSINT}/afscbint.xdr.c
370         ${CCRULE}
371
372 afsaux.o: ${FSINT}/afsaux.c
373         ${CCRULE}
374
375 clean:
376         $(RM) -f *.o libafsrpc*
377
378 ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}: ${LIBAFSRPC}
379         ${INSTALL} ${LIBAFSRPC} ${DESTDIR}${libdir}/${LIBAFSRPC}
380         -ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}
381
382 ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}: ${LIBAFSRPC}
383         ${INSTALL} ${LIBAFSRPC} ${TOP_LIBDIR}/${LIBAFSRPC}
384         -ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}
385
386 dest: ${DEST}/lib/${LIBAFSRPC}
387