Build and install PIC versions of libafsrpc and libafsauthent
[openafs.git] / src / shlibafsauthent / Makefile.in
1 # API version. When something changes, increment as appropriate. 
2 # Ignore at your own risk.
3 LIBAFSAUTHENTMAJOR=1
4 LIBAFSAUTHENTMINOR=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 ubikclient, auth, kauth.
14
15 srcdir=@srcdir@
16 include @TOP_OBJDIR@/src/config/Makefile.config
17 INSTALL = @INSTALL@
18 INSTALL_DATA = @INSTALL_DATA@
19 INSTALL_PROGRAM = @INSTALL_PROGRAM@
20 INSTALL_SCRIPT = @INSTALL_SCRIPT@
21
22 CC=${MT_CC}
23 CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS} ${SHLIB_CFLAGS} -I../auth -I../kauth -I../ptserver -I../sys
24 CCRULE = ${CC} ${CFLAGS} -c $?
25
26 AUDIT= ../audit
27 AUTH = ../auth
28 KAUTH = ../kauth
29 UBIK = ../ubik
30 UTIL = ../util
31 RXKAD = ../rxkad
32 PTSERVER = ../ptserver
33 SYS = ../sys
34
35 AUDITOBJS = audit.o
36
37 AUTHOBJS = \
38         cellconfig.o \
39         ktc.o \
40         userok.o \
41         writeconfig.o \
42         authcon.o \
43         ktc_errors.o \
44         acfg_errors.o
45
46 KAUTHOBJS = \
47         kauth.xdr.o \
48         kauth.cs.o \
49         kaaux.o \
50         client.o \
51         authclient.o \
52         token.o \
53         kautils.o \
54         kalocalcell.o \
55         kaerrors.o \
56         user.o \
57         read_passwd.o
58
59 UBIKOBJS = \
60         uinit.o \
61         ubikclient.o \
62         uerrors.o \
63         ubik_int.cs.o \
64         ubik_int.xdr.o
65
66 UTILOBJS = \
67         pthread_glock.o \
68         get_krbrlm.o \
69         dirpath.o \
70         serverLog.o \
71         snprintf.o \
72         fileutil.o
73
74 RXKADOBJS = \
75         rxkad_errs.o
76
77 SYSOBJS = \
78         rmtsysc.o \
79         rmtsys.xdr.o \
80         rmtsys.cs.o \
81         afssyscalls.o \
82         rmtsysnet.o \
83         glue.o \
84         setpag.o \
85         pioctl.o
86
87 PTSERVEROBJS = \
88         ptclient.o \
89         ptint.cs.o \
90         ptint.xdr.o \
91         ptuser.o \
92         display.o \
93         pterror.o
94
95 LIBOBJS = \
96         ${AUDITOBJS} \
97         ${AUTHOBJS} \
98         ${KAUTHOBJS} \
99         ${UBIKOBJS} \
100         ${UTILOBJS} \
101         ${RXKADOBJS} \
102         ${PTSERVEROBJS} \
103         ${SYSOBJS}
104
105 LIBAFSAUTHENT = libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR}.${LIBAFSAUTHENTMINOR}
106
107 all: ${TOP_LIBDIR}/${LIBAFSAUTHENT} ${TOP_LIBDIR}/libafsauthent_pic.a
108
109 ${TOP_LIBDIR}/${LIBAFSAUTHENT}: ${LIBAFSAUTHENT}
110         ../config/shlib-install -d ${TOP_LIBDIR} \
111                 -l libafsauthent \
112                 -M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR}
113
114 ${TOP_LIBDIR}/libafsauthent_pic.a: libafsauthent_pic.a
115         ${INSTALL_DATA} libafsauthent_pic.a $@
116
117 install: ${LIBAFSAUTHENT} libafsauthent_pic.a
118         ../config/shlib-install -d ${DESTDIR}${libdir} \
119                 -l libafsauthent \
120                 -M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR}
121         ${INSTALL_DATA} libafsauthent_pic.a \
122                 ${DESTDIR}${libdir}/libafsauthent_pic.a
123
124 dest: ${LIBAFSAUTHENT} libafsauthent_pic.a
125         ../config/shlib-install -d ${DEST}/lib \
126                 -l libafsauthent \
127                 -M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR}
128         ${INSTALL_DATA} libafsauthent_pic.a \
129                 ${DEST}/lib/libafsauthent_pic.a
130
131 ${LIBAFSAUTHENT}: ${LIBOBJS}
132         ../config/shlib-build -d $(srcdir) -l libafsauthent \
133                 -M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR} -- \
134                 -L${TOP_LIBDIR} -lafsrpc ${LIBOBJS} ${MT_LIBS}
135
136 libafsauthent_pic.a: ${LIBOBJS}
137         $(RM) -f $@
138         $(AR) crv $@ ${LIBOBJS}
139         $(RANLIB) $@
140
141 audit.o: ${AUDIT}/audit.c
142         ${CCRULE}
143
144 cellconfig.o: ${AUTH}/cellconfig.c
145         ${CCRULE}
146
147 ktc.o: ${AUTH}/ktc.c
148         ${CCRULE}
149
150 userok.o: ${AUTH}/userok.c
151         ${CCRULE}
152
153 writeconfig.o: ${AUTH}/writeconfig.c
154         ${CCRULE}
155
156 authcon.o: ${AUTH}/authcon.c
157         ${CCRULE}
158
159 ktc_errors.o: ${AUTH}/ktc_errors.c
160         ${CCRULE}
161
162 acfg_errors.o: ${AUTH}/acfg_errors.c
163         ${CCRULE}
164
165 kauth.xdr.o: ${KAUTH}/kauth.xdr.c
166         ${CCRULE}
167
168 kauth.cs.o: ${KAUTH}/kauth.cs.c
169         ${CCRULE}
170
171 kaaux.o: ${KAUTH}/kaaux.c
172         ${CCRULE}
173
174 client.o: ${KAUTH}/client.c
175         ${CCRULE}
176
177 authclient.o: ${KAUTH}/authclient.c
178         ${CCRULE}
179
180 token.o: ${KAUTH}/token.c
181         ${CCRULE}
182
183 kautils.o: ${KAUTH}/kautils.c
184         ${CCRULE}
185
186 kalocalcell.o: ${KAUTH}/kalocalcell.c
187         ${CCRULE}
188
189 kaerrors.o: ${KAUTH}/kaerrors.c
190         ${CCRULE}
191
192 user.o: ${KAUTH}/user.c
193         ${CCRULE}
194
195 read_passwd.o: ${KAUTH}/read_passwd.c
196         ${CCRULE}
197
198 ubikclient.o: ${UBIK}/ubikclient.c
199         ${CCRULE}
200
201 uinit.o: ${UBIK}/uinit.c
202         ${CCRULE}
203
204 uerrors.o: ${UBIK}/uerrors.c
205         ${CCRULE}
206
207 ubik_int.cs.o: ${UBIK}/ubik_int.cs.c
208         ${CCRULE}
209
210 ubik_int.xdr.o: ${UBIK}/ubik_int.xdr.c
211         ${CCRULE}
212
213 get_krbrlm.o: ${UTIL}/get_krbrlm.c
214         ${CCRULE}
215
216 dirpath.o: ${UTIL}/dirpath.c
217         ${CCRULE}
218
219 serverLog.o: ${UTIL}/serverLog.c
220         ${CCRULE}
221
222 snprintf.o: ${UTIL}/snprintf.c
223         ${CCRULE}
224
225 fileutil.o: ${UTIL}/fileutil.c
226         ${CCRULE}
227
228 pthread_glock.o: ${UTIL}/pthread_glock.c
229         ${CCRULE}
230
231 rxkad_errs.o: ${RXKAD}/rxkad_errs.c
232         ${CCRULE}
233
234 ptclient.o: ${PTSERVER}/ptclient.c
235         ${CCRULE}
236
237 # The special treatment of this file for hp_ux110 is because of a bug
238 # in version A.11.01.00 of the HP C compiler.  This bug appears to be
239 # fixed in version A.11.01.02 of the HP C compiler, however this version
240 # of the compiler is not installed on all of our build machines.
241 # The symptom of the problem is an error when linking the pthread fileserver:
242 # /usr/ccs/bin/ld: TP override with DATA_ONE_SYM fixup for non thread local
243 # storage symbol pr_Initialize in file DEST/lib/libafsauthent.a(ptuser.o)
244 ptuser.o: ${PTSERVER}/ptuser.c
245         set -x; \
246         case ${SYS_NAME} in \
247         hp_ux11*) \
248                 set X `echo ${CCRULE} | sed s/-g//`; shift; \
249                 "$$@" \
250                 ;; \
251         *) \
252                 ${CCRULE} \
253                 ;; \
254         esac
255
256 display.o: ${PTSERVER}/display.c
257         ${CCRULE}
258
259 ptint.cs.o: ${PTSERVER}/ptint.cs.c
260         ${CCRULE}
261
262 ptint.xdr.o: ${PTSERVER}/ptint.xdr.c
263         ${CCRULE}
264
265 pterror.o: ${PTSERVER}/pterror.c
266         ${CCRULE}
267
268 rmtsysc.o: ${SYS}/rmtsysc.c
269         ${CCRULE}
270
271 rmtsys.xdr.o: ${SYS}/rmtsys.xdr.c
272         ${CCRULE}
273
274 rmtsys.cs.o: ${SYS}/rmtsys.cs.c
275         ${CCRULE}
276
277 afssyscalls.o: ${SYS}/afssyscalls.c
278         ${CCRULE}
279
280 rmtsysnet.o: ${SYS}/rmtsysnet.c
281         ${CCRULE}
282
283 glue.o: ${SYS}/glue.c
284         ${CCRULE}
285
286 setpag.o: ${SYS}/setpag.c
287         ${CCRULE}
288
289 pioctl.o: ${SYS}/pioctl.c
290         ${CCRULE}
291
292 clean:
293         $(RM) -f *.o *.a libafsauthent.a* libafsauthent.sl* libafsauthent.so* libafsauthent_pic.a libafsauthent.dylib.*