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