kauth: Use libtool
[openafs.git] / src / kauth / 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 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.libtool
11 include @TOP_OBJDIR@/src/config/Makefile.lwp
12
13 BASE_objs = kauth.xdr.lo kauth.cs.lo kaaux.lo client.lo authclient.lo \
14             katoken.lo kautils.lo kalocalcell.lo kaerrors.lo
15
16 LT_objs = $(BASE_objs) user.lo
17 LWP_objs = $(LT_objs) krb_tf.o
18 KRB_objs = $(BASE_objs) user.krb.o krb_tf.o
19
20 LT_deps = $(top_builddir)/src/ubik/liboafs_ubik.la \
21           $(top_builddir)/src/auth/liboafs_auth.la \
22           $(top_builddir)/src/ptserver/liboafs_prot.la \
23           $(top_builddir)/src/sys/liboafs_sys.la \
24           $(top_builddir)/src/rxkad/liboafs_rxkad.la
25 LT_libs =
26
27 INCLS=${TOP_INCDIR}/ubik.h \
28              ${TOP_INCDIR}/lwp.h \
29              ${TOP_INCDIR}/lock.h  \
30              ${TOP_INCDIR}/rx/rx.h \
31              ${TOP_INCDIR}/rx/xdr.h \
32              ${TOP_INCDIR}/rx/rxkad.h \
33              ${TOP_INCDIR}/afs/com_err.h \
34         kaserver.h kauth.h kautils.h
35
36
37 LIBS=${TOP_LIBDIR}/libubik.a \
38         ${TOP_LIBDIR}/libprot.a \
39         ${TOP_LIBDIR}/libauth.a \
40         ${TOP_LIBDIR}/librxkad.a \
41         ${TOP_LIBDIR}/libsys.a \
42         ${TOP_LIBDIR}/librxstat.a \
43         ${TOP_LIBDIR}/librx.a \
44         ${TOP_LIBDIR}/libsys.a  \
45         ${TOP_LIBDIR}/liblwp.a \
46         ${TOP_LIBDIR}/libcmd.a \
47         ${TOP_LIBDIR}/libafscom_err.a \
48         ${TOP_LIBDIR}/libaudit.a \
49         ${TOP_LIBDIR}/libafsutil.a \
50         ${TOP_LIBDIR}/libopr.a \
51         $(DBM) \
52         ${TOP_LIBDIR}/libafshcrypto_lwp.a
53
54 KLIBS=${TOP_LIBDIR}/libubik.a \
55         ${TOP_LIBDIR}/libprot.a \
56         ${TOP_LIBDIR}/libauth.krb.a \
57         ${TOP_LIBDIR}/librxkad.a \
58         ${TOP_LIBDIR}/libsys.a \
59         ${TOP_LIBDIR}/librx.a \
60         ${TOP_LIBDIR}/libsys.a  \
61         ${TOP_LIBDIR}/liblwp.a \
62         ${TOP_LIBDIR}/libcmd.a \
63         ${TOP_LIBDIR}/libafscom_err.a \
64         ${TOP_LIBDIR}/libafsutil.a \
65         ${TOP_LIBDIR}/libopr.a \
66         ${TOP_LIBDIR}/libafshcrypto_lwp.a
67
68 all: liboafs_kauth.la \
69      kaserver kas kpwvalid klog klog.krb knfs kpasswd rebuild kdb ka-forwarder \
70         ${TOP_LIBDIR}/libkauth.a \
71         ${TOP_LIBDIR}/libkauth.krb.a \
72         depinstall
73
74 depinstall: \
75         kaerrors.c kauth.cs.c kauth.xdr.c \
76         ${TOP_INCDIR}/afs/kautils.h \
77         ${TOP_INCDIR}/afs/kauth.h \
78         ${TOP_INCDIR}/afs/kaport.h 
79
80 generated: \
81         kaerrors.c kautils.h \
82         kauth.cs.c kauth.ss.c kauth.xdr.c kauth.h
83
84 $(LT_objs): $(INCLS)
85
86 ${TOP_LIBDIR}/libkauth.a: libkauth.a
87         ${INSTALL_DATA} $? $@
88
89 ${TOP_LIBDIR}/libkauth.krb.a: libkauth.krb.a
90         ${INSTALL_DATA} $? $@
91
92 ${TOP_INCDIR}/afs/kautils.h: kautils.h
93         ${INSTALL_DATA} $? $@
94
95 ${TOP_INCDIR}/afs/kauth.h: kauth.h
96         ${INSTALL_DATA} $? $@
97
98 ${TOP_INCDIR}/afs/kaport.h: kaport.h
99         ${INSTALL_DATA} $? $@
100
101 liboafs_kauth.la: liboafs_kauth.la.sym $(LT_objs) $(LT_deps)
102         $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
103 test tests: all
104         cd test; $(MAKE)
105
106 kaserver: kadatabase.o kaprocs.o kalog.o kauth.ss.o kaserver.o krb_udp.o kaauxdb.o \
107           libkauth.a $(LIBS)
108         $(AFS_LDRULE) kaserver.o kadatabase.o \
109                 krb_udp.o kaprocs.o kalog.o kauth.ss.o \
110                 kaauxdb.o libkauth.a \
111                 $(LIBS) $(LIB_roken) $(LIB_crypt) ${XLIBS}
112
113 kaserver.o: kaserver.c ${INCLS} AFS_component_version_number.o
114
115 kadatabase.o: kadatabase.c ${INCLS}
116
117 kaprocs.o: kaprocs.c ${INCLS} kaport.h
118
119 kautils.h: kaerrors.c
120
121 kaerrors.c: kaerrors.et kautils.p.h
122         $(RM) -f kautils.h kaerrors.c
123         ${COMPILE_ET} -p ${srcdir} kaerrors -h kautils
124
125 kauth.xdr.lo: kauth.xdr.c kauth.h
126
127 kauth.cs.c: kauth.rg
128         ${RXGEN} -A -u -x -C -o $@ ${srcdir}/kauth.rg
129
130 kauth.ss.c: kauth.rg
131         ${RXGEN} -A -x -S -o $@ ${srcdir}/kauth.rg
132
133 kauth.xdr.c: kauth.rg
134         ${RXGEN} -A -x -c -o $@ ${srcdir}/kauth.rg
135
136 kauth.h: kauth.rg
137         ${RXGEN} -A -u -x -h -o $@ ${srcdir}/kauth.rg
138
139 kauth.xdr.c: kauth.h
140 kauth.cs.c: kauth.h
141 kauth.ss.c: kauth.h
142
143 Kkauth.cs.c: kauth.rg Kkauth.h
144         ${RXGEN} -A -x -k -C -o Kkauth.cs.c ${srcdir}/kauth.rg
145
146 Kkauth.xdr.c: kauth.rg
147         ${RXGEN} -A -x -k -c -o Kkauth.xdr.c ${srcdir}/kauth.rg
148
149 Kkauth.h: kauth.rg
150         ${RXGEN} -A -x -k -h -o Kkauth.h ${srcdir}/kauth.rg
151
152 libkauth.a: $(LWP_objs)
153         $(LT_LDLIB_lwp) $(LWP_objs)
154
155 libkauth.krb.a: $(KRB_objs)
156         $(LT_LDLIB_lwp) $(KRB_objs)
157
158 kas.o: kas.c ${INCLS} AFS_component_version_number.o
159
160 CFLAGS_admin_tools.o= @CFLAGS_NOERROR@
161 admin_tools.o: admin_tools.c ${INCLS} kaport.h
162
163 kkids.o: kkids.c ${INCLS}
164
165 krb_tf.o: krb_tf.c ${INCLS}
166
167 kas: kauth.h kautils.h admin_tools.o libkauth.a $(LIBS) kas.o kkids.o
168         $(AFS_LDRULE) kas.o admin_tools.o kkids.o libkauth.a \
169                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
170
171 klog: AFS_component_version_number.o kauth.h kautils.h libkauth.a $(LIBS) \
172         klog.o
173         $(AFS_LDRULE) klog.o libkauth.a \
174                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
175
176 klog.o: klog.c kauth.h kautils.h AFS_component_version_number.o
177
178 klog.krb: kauth.h kautils.h libkauth.krb.a $(KLIBS) klog.o
179         $(AFS_LDRULE) klog.o libkauth.krb.a \
180                 ${KLIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
181
182 knfs: kauth.h kautils.h libkauth.a $(LIBS) knfs.o
183         $(AFS_LDRULE) knfs.o libkauth.a \
184                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
185
186 knfs.o: knfs.c AFS_component_version_number.o
187
188 CFLAGS_klogin.o = -DKAUTH
189 klogin.o: klogin.c ${INCLS} AFS_component_version_number.o
190
191 klogin: libkauth.a $(LIBS) klogin.o
192         $(AFS_LDRULE) klogin.o libkauth.a \
193                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
194
195 klogin.krb: libkauth.a $(KLIBS) klogin.o
196         $(AFS_LDRULE) klogin.o libkauth.krb.a \
197                 ${KLIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
198
199 kpasswd.o: kauth.h kautils.h ${INCLS} kpasswd.c AFS_component_version_number.o
200
201 kpasswd: kauth.h kautils.h libkauth.a $(LIBS) kpasswd.o kkids.o
202         $(AFS_LDRULE) kpasswd.o kkids.o libkauth.a \
203                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
204
205 kpwvalid.o: kpwvalid.c AFS_component_version_number.o
206
207 kpwvalid: kpwvalid.o $(LIBS)
208         $(AFS_LDRULE) kpwvalid.o \
209                 ${LIBS} $(LIB_roken) ${XLIBS}
210
211 CFLAGS_user.krb.o = -DAFS_KERBEROS_ENV
212 user.krb.o: user.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
213         $(AFS_CCRULE) $(srcdir)/user.c
214
215 user.o: user.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
216
217 kdb: kdb.o ${INCLS} ${LIBS} libkauth.a
218         $(AFS_LDRULE) kdb.o libkauth.a \
219                 ${LIBS} $(LIB_roken) ${XLIBS}
220
221 kdb.o: kdb.c AFS_component_version_number.o
222
223 krb_udp.o: krb_udp.c kaserver.h kautils.h kauth.h prot.h ${TOP_INCDIR}/lwp.h AFS_component_version_number.o
224
225 krb_udp: krb_udp.o libkauth.a $(KLIBS)
226         $(AFS_LDRULE) krb_udp.o libkauth.a \
227                 $(KLIBS) $(LIB_roken)
228
229 ka-forwarder.o: ka-forwarder.c
230
231 ka-forwarder: ka-forwarder.o
232         $(AFS_LDRULE) ka-forwarder.o \
233                 ${LIBS} $(LIB_roken) ${XLIBS}
234
235 rebuild.o: rebuild.c $(INCLS) AFS_component_version_number.o
236
237 rebuild: rebuild.o $(LIBS) libkauth.a
238         $(AFS_LDRULE) rebuild.o libkauth.a \
239                 $(LIBS) $(LIB_roken) ${XLIBS}
240
241 #
242 # Install targets
243 #
244 install: kaserver kas kpwvalid kas klog klog.krb knfs kpasswd libkauth.a \
245                 libkauth.krb.a rebuild kdb ka-forwarder kautils.h kauth.h \
246                 kaport.h
247         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
248         ${INSTALL} -d ${DESTDIR}${bindir}
249         ${INSTALL} -d ${DESTDIR}${sbindir}
250         ${INSTALL} -d ${DESTDIR}${afssrvbindir}
251         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
252         ${INSTALL} -d ${DESTDIR}${libdir}/afs
253         ${INSTALL} -d ${DESTDIR}${includedir}/afs
254         ${INSTALL_PROGRAM} kaserver ${DESTDIR}${afssrvlibexecdir}/kaserver
255         ${INSTALL_PROGRAM} kas ${DESTDIR}${sbindir}/kas
256         ${INSTALL_PROGRAM} kpwvalid ${DESTDIR}${sbindir}/kpwvalid
257         ${INSTALL_PROGRAM} kas ${DESTDIR}${afssrvsbindir}/kas
258         ${INSTALL_PROGRAM} kpwvalid ${DESTDIR}${afssrvsbindir}/kpwvalid
259         ${INSTALL_PROGRAM} klog ${DESTDIR}${bindir}/klog
260         ${INSTALL_PROGRAM} klog.krb ${DESTDIR}${bindir}/klog.krb
261         ${INSTALL_PROGRAM} klog ${DESTDIR}${afssrvbindir}/klog
262         ${INSTALL_PROGRAM} klog.krb ${DESTDIR}${afssrvbindir}/klog.krb
263         ${INSTALL_PROGRAM} knfs ${DESTDIR}${bindir}/knfs
264         ${INSTALL_PROGRAM} kpasswd ${DESTDIR}${bindir}/kpasswd
265         ${INSTALL_PROGRAM} kpwvalid ${DESTDIR}${bindir}/kpwvalid
266         ${INSTALL_DATA} libkauth.a ${DESTDIR}${libdir}/afs/libkauth.a
267         ${INSTALL_DATA} libkauth.krb.a ${DESTDIR}${libdir}/afs/libkauth.krb.a
268         ${INSTALL_PROGRAM} rebuild ${DESTDIR}${afssrvsbindir}/kadb_check
269         ${INSTALL_PROGRAM} kdb ${DESTDIR}${afssrvsbindir}/kdb
270         ${INSTALL_PROGRAM} ka-forwarder ${DESTDIR}${afssrvsbindir}/ka-forwarder
271         ${INSTALL_DATA} kautils.h ${DESTDIR}${includedir}/afs/kautils.h
272         ${INSTALL_DATA} kauth.h ${DESTDIR}${includedir}/afs/kauth.h
273         ${INSTALL_DATA} ${srcdir}/kaport.h ${DESTDIR}${includedir}/afs/kaport.h
274
275 dest: kaserver kas kpwvalid kas klog klog.krb knfs kpasswd libkauth.a \
276                 libkauth.krb.a rebuild kdb ka-forwarder kautils.h kauth.h \
277                 kaport.h
278         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
279         ${INSTALL} -d ${DEST}/etc
280         ${INSTALL} -d ${DEST}/bin
281         ${INSTALL} -d ${DEST}/lib/afs
282         ${INSTALL} -d ${DEST}/include/afs
283         ${INSTALL_PROGRAM} kaserver ${DEST}/root.server/usr/afs/bin/kaserver
284         ${INSTALL_PROGRAM} kas ${DEST}/etc/kas
285         ${INSTALL_PROGRAM} kpwvalid ${DEST}/etc/kpwvalid
286         ${INSTALL_PROGRAM} kas ${DEST}/root.server/usr/afs/bin/kas
287         ${INSTALL_PROGRAM} kpwvalid ${DEST}/root.server/usr/afs/bin/kpwvalid
288         ${INSTALL_PROGRAM} klog ${DEST}/bin/klog
289         ${INSTALL_PROGRAM} klog.krb ${DEST}/bin/klog.krb
290         ${INSTALL_PROGRAM} klog ${DEST}/root.server/usr/afs/bin/klog
291         ${INSTALL_PROGRAM} klog.krb ${DEST}/root.server/usr/afs/bin/klog.krb
292         ${INSTALL_PROGRAM} knfs ${DEST}/bin/knfs
293         ${INSTALL_PROGRAM} kpasswd ${DEST}/bin/kpasswd
294         ${INSTALL_PROGRAM} kpwvalid ${DEST}/bin/kpwvalid
295         ${INSTALL_DATA} libkauth.a ${DEST}/lib/afs/libkauth.a
296         ${INSTALL_DATA} libkauth.krb.a ${DEST}/lib/afs/libkauth.krb.a
297         ${INSTALL_PROGRAM} kdb ${DEST}/etc/kdb
298         ${INSTALL_PROGRAM} rebuild ${DEST}/etc/kadb_check
299         ${INSTALL_PROGRAM} ka-forwarder ${DEST}/root.server/usr/afs/bin/ka-forwarder
300         ${INSTALL_DATA} kautils.h ${DEST}/include/afs/kautils.h
301         ${INSTALL_DATA} kauth.h ${DEST}/include/afs/kauth.h
302         ${INSTALL_DATA} ${srcdir}/kaport.h ${DEST}/include/afs/kaport.h
303
304 #
305 # Misc. targets
306 #
307 clean:
308         $(RM) -f *.o *.a *.xdr.c *.cs.c *.ss.c core \
309                 kaserver kas klog multiklog kpasswd klogin rebuild \
310                 ka-forwarder \
311                 kauth.h kautils.h kaerrors.c kpwvalid \
312                 AFS_component_version_number.c \
313                 klog.krb knfs klogin.krb kdb Kkauth.h
314
315 include ../config/Makefile.version