namei_mapper-20060731
[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 \
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} -u -x -C -o $@ ${srcdir}/kauth.rg
100
101 kauth.ss.c: kauth.rg
102         ${RXGEN} -x -S -o $@ ${srcdir}/kauth.rg
103
104 kauth.xdr.c: kauth.rg
105         ${RXGEN} -x -c -o $@ ${srcdir}/kauth.rg
106
107 kauth.h: kauth.rg
108         ${RXGEN} -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} -x -k -C -o Kkauth.cs.c ${srcdir}/kauth.rg
116
117 Kkauth.xdr.c: kauth.rg
118         ${RXGEN} -x -k -c -o Kkauth.xdr.c ${srcdir}/kauth.rg
119
120 Kkauth.h: kauth.rg
121         ${RXGEN} -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 rebuild.o: rebuild.c $(INCLS) AFS_component_version_number.o
204
205 rebuild: rebuild.o kautils.o $(LIBS)
206         ${CC} ${LDFLAGS} -o rebuild rebuild.o kautils.o $(LIBS)
207
208 #
209 # Install targets
210 #
211 ${TOP_LIBDIR}/libkauth.a: libkauth.a
212         ${INSTALL} $? $@
213
214 ${TOP_LIBDIR}/libkauth.krb.a: libkauth.krb.a
215         ${INSTALL} $? $@
216
217 ${TOP_INCDIR}/afs/kautils.h: kautils.h
218         ${INSTALL} $? $@
219
220 ${TOP_INCDIR}/afs/kauth.h: kauth.h
221         ${INSTALL} $? $@
222
223 ${TOP_INCDIR}/afs/kaport.h: kaport.h
224         ${INSTALL} $? $@
225
226 install: \
227         ${DESTDIR}${afssrvlibexecdir}/kaserver \
228         ${DESTDIR}${sbindir}/kas \
229         ${DESTDIR}${sbindir}/kpwvalid \
230         ${DESTDIR}${afssrvsbindir}/kas \
231         ${DESTDIR}${afssrvsbindir}/kpwvalid \
232         ${DESTDIR}${bindir}/klog \
233         ${DESTDIR}${bindir}/klog.krb \
234         ${DESTDIR}${afssrvbindir}/klog \
235         ${DESTDIR}${afssrvbindir}/klog.krb \
236         ${DESTDIR}${bindir}/knfs \
237         ${DESTDIR}${bindir}/kpasswd \
238         ${DESTDIR}${bindir}/kpwvalid \
239         ${DESTDIR}${libdir}/afs/libkauth.a \
240         ${DESTDIR}${libdir}/afs/libkauth.krb.a \
241         ${DESTDIR}${afssrvsbindir}/kadb_check \
242         ${DESTDIR}${afssrvsbindir}/kdb \
243         ${DESTDIR}${includedir}/afs/kautils.h \
244         ${DESTDIR}${includedir}/afs/kauth.h \
245         ${DESTDIR}${includedir}/afs/kaport.h
246
247 ${DESTDIR}${afssrvlibexecdir}/kaserver: kaserver
248         ${INSTALL} -s $? $@
249
250 ${DESTDIR}${sbindir}/kas: kas
251         ${INSTALL} -s $? $@
252
253 ${DESTDIR}${sbindir}/kpwvalid: kpwvalid
254         ${INSTALL} $? $@
255
256 ${DESTDIR}${afssrvsbindir}/kas: kas
257         ${INSTALL} -s $? $@
258
259 ${DESTDIR}${afssrvsbindir}/kpwvalid: kpwvalid
260         ${INSTALL} $? $@
261
262 ${DESTDIR}${bindir}/klog: klog
263         ${INSTALL} -s $? $@
264
265 ${DESTDIR}${bindir}/klog.krb: klog.krb
266         ${INSTALL} -s $? $@
267
268 ${DESTDIR}${afssrvbindir}/klog: klog
269         ${INSTALL} -s $? $@
270
271 ${DESTDIR}${afssrvbindir}/klog.krb: klog.krb
272         ${INSTALL} -s $? $@
273
274 ${DESTDIR}${bindir}/knfs: knfs
275         ${INSTALL} -s $? $@
276
277 ${DESTDIR}${bindir}/kpasswd: kpasswd
278         ${INSTALL} -s $? $@
279
280 ${DESTDIR}${bindir}/kpwvalid: kpwvalid
281         ${INSTALL} $? $@
282
283 ${DESTDIR}${libdir}/afs/libkauth.a: libkauth.a
284         ${INSTALL} $? $@
285
286 ${DESTDIR}${libdir}/afs/libkauth.krb.a: libkauth.krb.a
287         ${INSTALL} $? $@
288
289 ${DESTDIR}${afssrvsbindir}/kadb_check: rebuild
290         ${INSTALL} -f $? $@
291
292 ${DESTDIR}${afssrvsbindir}/kdb: kdb
293         ${INSTALL} -s $? $@
294
295 ${DESTDIR}${includedir}/afs/kautils.h: kautils.h
296         ${INSTALL} $? $@
297
298 ${DESTDIR}${includedir}/afs/kauth.h: kauth.h
299         ${INSTALL} $? $@
300
301 ${DESTDIR}${includedir}/afs/kaport.h: kaport.h
302         ${INSTALL} $? $@
303
304 dest: \
305         ${DEST}/root.server/usr/afs/bin/kaserver \
306         ${DEST}/etc/kas \
307         ${DEST}/etc/kpwvalid \
308         ${DEST}/root.server/usr/afs/bin/kas \
309         ${DEST}/root.server/usr/afs/bin/kpwvalid \
310         ${DEST}/bin/klog \
311         ${DEST}/bin/klog.krb \
312         ${DEST}/root.server/usr/afs/bin/klog \
313         ${DEST}/root.server/usr/afs/bin/klog.krb \
314         ${DEST}/bin/knfs \
315         ${DEST}/bin/kpasswd \
316         ${DEST}/bin/kpwvalid \
317         ${DEST}/lib/afs/libkauth.a \
318         ${DEST}/lib/afs/libkauth.krb.a \
319         ${DEST}/etc/kdb \
320         ${DEST}/etc/kadb_check \
321         ${DEST}/include/afs/kautils.h \
322         ${DEST}/include/afs/kauth.h \
323         ${DEST}/include/afs/kaport.h
324
325 ${DEST}/root.server/usr/afs/bin/kaserver: kaserver
326         ${INSTALL} -s $? $@
327
328 ${DEST}/etc/kas ${DEST}/root.server/usr/afs/bin/kas: kas 
329         ${INSTALL} -s $? $@
330
331 ${DEST}/bin/kpwvalid ${DEST}/etc/kpwvalid ${DEST}/root.server/usr/afs/bin/kpwvalid: kpwvalid 
332         ${INSTALL} $? $@
333
334 ${DEST}/bin/klog ${DEST}/root.server/usr/afs/bin/klog: klog 
335         ${INSTALL} -s $? $@
336
337 ${DEST}/bin/klog.krb ${DEST}/root.server/usr/afs/bin/klog.krb: klog.krb 
338         ${INSTALL} -s $? $@
339
340 ${DEST}/bin/knfs: knfs 
341         ${INSTALL} -s $? $@
342
343 ${DEST}/bin/kpasswd: kpasswd 
344         ${INSTALL} -s $? $@
345
346 ${DEST}/lib/afs/libkauth.a: libkauth.a 
347         ${INSTALL} $? $@
348
349 ${DEST}/lib/afs/libkauth.krb.a: libkauth.krb.a 
350         ${INSTALL} $? $@
351
352 ${DEST}/etc/kadb_check: rebuild
353         ${INSTALL} -f $? $@
354
355 ${DEST}/etc/kdb: kdb 
356         ${INSTALL} -s $? $@
357
358 ${DEST}/include/afs/kautils.h: kautils.h
359         ${INSTALL} $? $@
360
361 ${DEST}/include/afs/kauth.h: kauth.h
362         ${INSTALL} $? $@
363
364 ${DEST}/include/afs/kaport.h: kaport.h
365         ${INSTALL} $? $@
366
367 #
368 # Misc. targets
369 #
370 include ../config/Makefile.version
371
372 clean:
373         $(RM) -f *.o *.a *.xdr.c *.cs.c *.ss.c core \
374                 kaserver kas klog multiklog kpasswd klogin rebuild \
375                 kauth.h kautils.h kaerrors.c kpwvalid AFS_component_version_number.c \
376                 klog.krb knfs klogin.krb kdb Kkauth.h
377