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