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