37ce7edb48f6f44968227bb20982242102491d02
[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 libauthent_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
104 libauthent_kauth.la: $(LT_objs)
105         $(LT_LDLIB_pic) $(LT_objs)
106
107 test tests: all
108         cd test; $(MAKE)
109
110 kaserver: kadatabase.o kaprocs.o kalog.o kauth.ss.o kaserver.o krb_udp.o kaauxdb.o \
111           libkauth.a $(LIBS)
112         $(AFS_LDRULE) kaserver.o kadatabase.o \
113                 krb_udp.o kaprocs.o kalog.o kauth.ss.o \
114                 kaauxdb.o libkauth.a \
115                 $(LIBS) $(LIB_roken) $(LIB_crypt) ${XLIBS}
116
117 kaserver.o: kaserver.c ${INCLS} AFS_component_version_number.o
118
119 kadatabase.o: kadatabase.c ${INCLS}
120
121 kaprocs.o: kaprocs.c ${INCLS} kaport.h
122
123 kautils.h: kaerrors.c
124
125 kaerrors.c: kaerrors.et kautils.p.h
126         $(RM) -f kautils.h kaerrors.c
127         ${COMPILE_ET} -p ${srcdir} kaerrors -h kautils
128
129 kauth.xdr.lo: kauth.xdr.c kauth.h
130
131 kauth.cs.c: kauth.rg
132         ${RXGEN} -A -u -x -C -o $@ ${srcdir}/kauth.rg
133
134 kauth.ss.c: kauth.rg
135         ${RXGEN} -A -x -S -o $@ ${srcdir}/kauth.rg
136
137 kauth.xdr.c: kauth.rg
138         ${RXGEN} -A -x -c -o $@ ${srcdir}/kauth.rg
139
140 kauth.h: kauth.rg
141         ${RXGEN} -A -u -x -h -o $@ ${srcdir}/kauth.rg
142
143 kauth.xdr.c: kauth.h
144 kauth.cs.c: kauth.h
145 kauth.ss.c: kauth.h
146
147 Kkauth.cs.c: kauth.rg Kkauth.h
148         ${RXGEN} -A -x -k -C -o Kkauth.cs.c ${srcdir}/kauth.rg
149
150 Kkauth.xdr.c: kauth.rg
151         ${RXGEN} -A -x -k -c -o Kkauth.xdr.c ${srcdir}/kauth.rg
152
153 Kkauth.h: kauth.rg
154         ${RXGEN} -A -x -k -h -o Kkauth.h ${srcdir}/kauth.rg
155
156 libkauth.a: $(LWP_objs)
157         $(LT_LDLIB_lwp) $(LWP_objs)
158
159 libkauth.krb.a: $(KRB_objs)
160         $(LT_LDLIB_lwp) $(KRB_objs)
161
162 kas.o: kas.c ${INCLS} AFS_component_version_number.o
163
164 CFLAGS_admin_tools.o= @CFLAGS_NOERROR@
165 admin_tools.o: admin_tools.c ${INCLS} kaport.h
166
167 kkids.o: kkids.c ${INCLS}
168
169 krb_tf.o: krb_tf.c ${INCLS}
170
171 kas: kauth.h kautils.h admin_tools.o libkauth.a $(LIBS) kas.o kkids.o
172         $(AFS_LDRULE) kas.o admin_tools.o kkids.o libkauth.a \
173                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
174
175 klog: AFS_component_version_number.o kauth.h kautils.h libkauth.a $(LIBS) \
176         klog.o
177         $(AFS_LDRULE) klog.o libkauth.a \
178                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
179
180 klog.o: klog.c kauth.h kautils.h AFS_component_version_number.o
181
182 klog.krb: kauth.h kautils.h libkauth.krb.a $(KLIBS) klog.o
183         $(AFS_LDRULE) klog.o libkauth.krb.a \
184                 ${KLIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
185
186 knfs: kauth.h kautils.h libkauth.a $(LIBS) knfs.o
187         $(AFS_LDRULE) knfs.o libkauth.a \
188                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
189
190 knfs.o: knfs.c AFS_component_version_number.o
191
192 CFLAGS_klogin.o = -DKAUTH
193 klogin.o: klogin.c ${INCLS} AFS_component_version_number.o
194
195 klogin: libkauth.a $(LIBS) klogin.o
196         $(AFS_LDRULE) klogin.o libkauth.a \
197                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
198
199 klogin.krb: libkauth.a $(KLIBS) klogin.o
200         $(AFS_LDRULE) klogin.o libkauth.krb.a \
201                 ${KLIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
202
203 kpasswd.o: kauth.h kautils.h ${INCLS} kpasswd.c AFS_component_version_number.o
204
205 kpasswd: kauth.h kautils.h libkauth.a $(LIBS) kpasswd.o kkids.o
206         $(AFS_LDRULE) kpasswd.o kkids.o libkauth.a \
207                 ${LIBS} $(LIB_roken) $(LIB_crypt) ${XLIBS}
208
209 kpwvalid.o: kpwvalid.c AFS_component_version_number.o
210
211 kpwvalid: kpwvalid.o $(LIBS)
212         $(AFS_LDRULE) kpwvalid.o \
213                 ${LIBS} $(LIB_roken) ${XLIBS}
214
215 CFLAGS_user.krb.o = -DAFS_KERBEROS_ENV
216 user.krb.o: user.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
217         $(AFS_CCRULE) $(srcdir)/user.c
218
219 user.o: user.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
220
221 kdb: kdb.o ${INCLS} ${LIBS} libkauth.a
222         $(AFS_LDRULE) kdb.o libkauth.a \
223                 ${LIBS} $(LIB_roken) ${XLIBS}
224
225 kdb.o: kdb.c AFS_component_version_number.o
226
227 krb_udp.o: krb_udp.c kaserver.h kautils.h kauth.h prot.h ${TOP_INCDIR}/lwp.h AFS_component_version_number.o
228
229 krb_udp: krb_udp.o libkauth.a $(KLIBS)
230         $(AFS_LDRULE) krb_udp.o libkauth.a \
231                 $(KLIBS) $(LIB_roken)
232
233 ka-forwarder.o: ka-forwarder.c
234
235 ka-forwarder: ka-forwarder.o
236         $(AFS_LDRULE) ka-forwarder.o \
237                 ${LIBS} $(LIB_roken) ${XLIBS}
238
239 rebuild.o: rebuild.c $(INCLS) AFS_component_version_number.o
240
241 rebuild: rebuild.o $(LIBS) libkauth.a
242         $(AFS_LDRULE) rebuild.o libkauth.a \
243                 $(LIBS) $(LIB_roken) ${XLIBS}
244
245 #
246 # Install targets
247 #
248 install: kaserver kas kpwvalid kas klog klog.krb knfs kpasswd libkauth.a \
249                 libkauth.krb.a rebuild kdb ka-forwarder kautils.h kauth.h \
250                 kaport.h
251         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
252         ${INSTALL} -d ${DESTDIR}${bindir}
253         ${INSTALL} -d ${DESTDIR}${sbindir}
254         ${INSTALL} -d ${DESTDIR}${afssrvbindir}
255         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
256         ${INSTALL} -d ${DESTDIR}${libdir}/afs
257         ${INSTALL} -d ${DESTDIR}${includedir}/afs
258         ${INSTALL_PROGRAM} kaserver ${DESTDIR}${afssrvlibexecdir}/kaserver
259         ${INSTALL_PROGRAM} kas ${DESTDIR}${sbindir}/kas
260         ${INSTALL_PROGRAM} kpwvalid ${DESTDIR}${sbindir}/kpwvalid
261         ${INSTALL_PROGRAM} kas ${DESTDIR}${afssrvsbindir}/kas
262         ${INSTALL_PROGRAM} kpwvalid ${DESTDIR}${afssrvsbindir}/kpwvalid
263         ${INSTALL_PROGRAM} klog ${DESTDIR}${bindir}/klog
264         ${INSTALL_PROGRAM} klog.krb ${DESTDIR}${bindir}/klog.krb
265         ${INSTALL_PROGRAM} klog ${DESTDIR}${afssrvbindir}/klog
266         ${INSTALL_PROGRAM} klog.krb ${DESTDIR}${afssrvbindir}/klog.krb
267         ${INSTALL_PROGRAM} knfs ${DESTDIR}${bindir}/knfs
268         ${INSTALL_PROGRAM} kpasswd ${DESTDIR}${bindir}/kpasswd
269         ${INSTALL_PROGRAM} kpwvalid ${DESTDIR}${bindir}/kpwvalid
270         ${INSTALL_DATA} libkauth.a ${DESTDIR}${libdir}/afs/libkauth.a
271         ${INSTALL_DATA} libkauth.krb.a ${DESTDIR}${libdir}/afs/libkauth.krb.a
272         ${INSTALL_PROGRAM} rebuild ${DESTDIR}${afssrvsbindir}/kadb_check
273         ${INSTALL_PROGRAM} kdb ${DESTDIR}${afssrvsbindir}/kdb
274         ${INSTALL_PROGRAM} ka-forwarder ${DESTDIR}${afssrvsbindir}/ka-forwarder
275         ${INSTALL_DATA} kautils.h ${DESTDIR}${includedir}/afs/kautils.h
276         ${INSTALL_DATA} kauth.h ${DESTDIR}${includedir}/afs/kauth.h
277         ${INSTALL_DATA} ${srcdir}/kaport.h ${DESTDIR}${includedir}/afs/kaport.h
278
279 dest: kaserver kas kpwvalid kas klog klog.krb knfs kpasswd libkauth.a \
280                 libkauth.krb.a rebuild kdb ka-forwarder kautils.h kauth.h \
281                 kaport.h
282         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
283         ${INSTALL} -d ${DEST}/etc
284         ${INSTALL} -d ${DEST}/bin
285         ${INSTALL} -d ${DEST}/lib/afs
286         ${INSTALL} -d ${DEST}/include/afs
287         ${INSTALL_PROGRAM} kaserver ${DEST}/root.server/usr/afs/bin/kaserver
288         ${INSTALL_PROGRAM} kas ${DEST}/etc/kas
289         ${INSTALL_PROGRAM} kpwvalid ${DEST}/etc/kpwvalid
290         ${INSTALL_PROGRAM} kas ${DEST}/root.server/usr/afs/bin/kas
291         ${INSTALL_PROGRAM} kpwvalid ${DEST}/root.server/usr/afs/bin/kpwvalid
292         ${INSTALL_PROGRAM} klog ${DEST}/bin/klog
293         ${INSTALL_PROGRAM} klog.krb ${DEST}/bin/klog.krb
294         ${INSTALL_PROGRAM} klog ${DEST}/root.server/usr/afs/bin/klog
295         ${INSTALL_PROGRAM} klog.krb ${DEST}/root.server/usr/afs/bin/klog.krb
296         ${INSTALL_PROGRAM} knfs ${DEST}/bin/knfs
297         ${INSTALL_PROGRAM} kpasswd ${DEST}/bin/kpasswd
298         ${INSTALL_PROGRAM} kpwvalid ${DEST}/bin/kpwvalid
299         ${INSTALL_DATA} libkauth.a ${DEST}/lib/afs/libkauth.a
300         ${INSTALL_DATA} libkauth.krb.a ${DEST}/lib/afs/libkauth.krb.a
301         ${INSTALL_PROGRAM} kdb ${DEST}/etc/kdb
302         ${INSTALL_PROGRAM} rebuild ${DEST}/etc/kadb_check
303         ${INSTALL_PROGRAM} ka-forwarder ${DEST}/root.server/usr/afs/bin/ka-forwarder
304         ${INSTALL_DATA} kautils.h ${DEST}/include/afs/kautils.h
305         ${INSTALL_DATA} kauth.h ${DEST}/include/afs/kauth.h
306         ${INSTALL_DATA} ${srcdir}/kaport.h ${DEST}/include/afs/kaport.h
307
308 #
309 # Misc. targets
310 #
311 clean:
312         $(RM) -f *.o *.a *.xdr.c *.cs.c *.ss.c core \
313                 kaserver kas klog multiklog kpasswd klogin rebuild \
314                 ka-forwarder \
315                 kauth.h kautils.h kaerrors.c kpwvalid \
316                 AFS_component_version_number.c \
317                 klog.krb knfs klogin.krb kdb Kkauth.h
318
319 include ../config/Makefile.version