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