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