tests: Move code to add new DES keys to common
[openafs.git] / 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 # Portions Copyright (c) 2003 Apple Computer, Inc.
9
10 srcdir=@srcdir@
11 include @TOP_OBJDIR@/src/config/Makefile.config
12
13 ENABLE_KERNEL_MODULE=@ENABLE_KERNEL_MODULE@
14 ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
15
16 # To compile AFS from scratch in the src tree run "make".
17 #   This recursively calls "make install ..." and does not depend on the
18 #   existence of any non-standard programs.
19 # To compile for the kernel type "make blibafs".  This assumes install, 
20 #   rxgen, compile_et and others already exist and runs it with
21 #   "-argument kinstall".
22
23 COMPILE_PART1  = cd src && cd
24 COMPILE_PART2A = && $(MAKE)
25 COMPILE_PART2B = all
26 COMPILE_PART2  = ${COMPILE_PART2A} ${COMPILE_PART2B}
27 COMPILE_CLEAN  = ${COMPILE_PART2A} clean
28 COMPILE_DEPINSTALL  = ${COMPILE_PART2A} depinstall
29 COMPILE_GENERATED  = ${COMPILE_PART2A} generated
30
31 all: force
32         $(MAKE) build
33
34 all_nolibafs: force
35         $(MAKE) build TARGET=finale_nolibafs
36
37 only_libafs: force
38         $(MAKE) build TARGET=libafs
39
40 only_libafs_tree: force
41         $(MAKE) build TARGET=libafs_tree
42
43 buildtools: force
44         $(MAKE) build TARGET=build_tools COMPILE_PART2B=buildtools
45
46 generated: force buildtools
47         +${COMPILE_PART1} afs ${COMPILE_GENERATED}
48         +${COMPILE_PART1} auth ${COMPILE_GENERATED}
49         +${COMPILE_PART1} bozo ${COMPILE_GENERATED}
50         +${COMPILE_PART1} bubasics ${COMPILE_GENERATED}
51         +${COMPILE_PART1} bucoord ${COMPILE_GENERATED}
52         +${COMPILE_PART1} budb ${COMPILE_GENERATED}
53         +${COMPILE_PART1} cmd ${COMPILE_GENERATED}
54         +${COMPILE_PART1} des ${COMPILE_GENERATED}
55         +${COMPILE_PART1} fsint ${COMPILE_GENERATED}
56         +${COMPILE_PART1} kauth ${COMPILE_GENERATED}
57         +${COMPILE_PART1} ptserver ${COMPILE_GENERATED}
58         +${COMPILE_PART1} rxkad ${COMPILE_GENERATED}
59         +${COMPILE_PART1} rxstat ${COMPILE_GENERATED}
60         +${COMPILE_PART1} sys ${COMPILE_GENERATED}
61         +${COMPILE_PART1} tests ${COMPILE_GENERATED}
62         +${COMPILE_PART1} ubik ${COMPILE_GENERATED}
63         +${COMPILE_PART1} update ${COMPILE_GENERATED}
64         +${COMPILE_PART1} vlserver ${COMPILE_GENERATED}
65         +${COMPILE_PART1} volser ${COMPILE_GENERATED}
66         +${COMPILE_PART1} config ${COMPILE_PART2A} generated_clean
67
68 install: all install_dirs
69         $(MAKE) build COMPILE_PART2B=install
70
71 install_nolibafs: all_nolibafs install_dirs
72         $(MAKE) build TARGET=finale_nolibafs COMPILE_PART2B=install
73
74 install_only_libafs: only_libafs install_dirs
75         $(MAKE) build TARGET=libafs COMPILE_PART2B=install
76
77 dest: all dest_dirs
78         $(MAKE) build COMPILE_PART2B=dest
79         -${INSTALL_DATA} ${srcdir}/src/LICENSE ${DEST}/LICENSE
80
81 dest_nolibafs: all_nolibafs dest_dirs
82         $(MAKE) build TARGET=finale_nolibafs COMPILE_PART2B=dest
83         -${INSTALL_DATA} ${srcdir}/src/LICENSE ${DEST}/LICENSE
84
85 dest_only_libafs: only_libafs dest_dirs
86         $(MAKE) build TARGET=libafs COMPILE_PART2B=dest
87         -${INSTALL_DATA} ${srcdir}/src/LICENSE ${DEST}/LICENSE
88
89 dpkg:
90         ln -fs ${srcdir}/src/packaging/Debian debian
91         dpkg-buildpackage -rfakeroot -b -us -uc
92
93 packages: dest
94         @case ${SYS_NAME} in \
95         *_darwin_* ) \
96                 ${COMPILE_PART1} packaging/MacOS && sh ./buildpkg.sh ${DEST} ;; \
97         hp_ux110 ) \
98                 ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.00 ;; \
99         hp_ux11i ) \
100                 ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.11 ;; \
101         ia64_hpux1122 ) \
102                 ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.22 ;; \
103         ia64_hpux1123 | hp_ux1123) \
104                 ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.23 ;; \
105         *) \
106                 echo Not building packages for ${SYS_NAME} ;; \
107         esac
108
109 ${TOP_INCDIR}/afs ${TOP_INCDIR}/rx ${TOP_INCDIR}/hcrypto ${TOP_INCDIR}/opr ${TOP_LIBDIR} ${TOP_JLIBDIR}:
110         mkdir -p $@
111
112 install_dirs: force
113         mkdir -p ${DESTDIR}${bindir}
114         mkdir -p ${DESTDIR}${sbindir}
115         mkdir -p ${DESTDIR}${libexecdir}/openafs
116         mkdir -p ${DESTDIR}${libdir}/afs
117         mkdir -p ${DESTDIR}${includedir}/afs
118         mkdir -p ${DESTDIR}${includedir}/rx
119         mkdir -p ${DESTDIR}${afskerneldir}
120         mkdir -p ${DESTDIR}${afssrvbindir}
121         mkdir -p ${DESTDIR}${afssrvsbindir}
122         mkdir -p ${DESTDIR}${afssrvlibexecdir}
123         mkdir -p ${DESTDIR}${afsdatadir}/C
124
125 dest_dirs: force
126         mkdir -p ${DEST}/bin
127         mkdir -p ${DEST}/etc
128         mkdir -p ${DEST}/lib/afs
129         mkdir -p ${DEST}/include/afs
130         mkdir -p ${DEST}/include/rx
131         mkdir -p ${DEST}/root.client/usr/vice/etc/C
132         mkdir -p ${DEST}/root.server/etc
133         mkdir -p ${DEST}/root.server/usr/afs/bin
134
135 prelude: ${TOP_INCDIR}/afs ${TOP_INCDIR}/rx ${TOP_INCDIR}/hcrypto ${TOP_INCDIR}/opr ${TOP_LIBDIR}
136
137 project: cmd comerr 
138
139 tests: all 
140         +${COMPILE_PART1} tests ${COMPILE_PART2}
141
142 config: prelude
143         +${COMPILE_PART1} config ${COMPILE_PART2}
144
145 procmgmt: $(DIR_roken) config
146         +${COMPILE_PART1} procmgmt ${COMPILE_PART2}
147
148 util: $(DIR_roken) procmgmt hcrypto lwp_depinstall rx_depinstall
149         +${COMPILE_PART1} util ${COMPILE_PART2}
150
151 libafscp: util afs volser vlserver rx auth fsint
152         +${COMPILE_PART1} libafscp ${COMPILE_PART2}
153
154 audit: util rx rxkad fsint
155         +${COMPILE_PART1} audit ${COMPILE_PART2} #TODO
156
157 comerr: util $(DIR_roken)
158         +${COMPILE_PART1} comerr ${COMPILE_PART2}
159
160 cmd: comerr
161         +@case ${SYS_NAME} in \
162         sgi_6* | sun*_5[789] | sun*_51[01] | hp_ux11* | ia64_hpux* | sparc64_linux* | alpha_linux* ) \
163                 ${COMPILE_PART1} cmd ${COMPILE_PART2}64 ;; \
164         *) \
165                 ${COMPILE_PART1} cmd ${COMPILE_PART2} ;; \
166         esac
167
168 hcrypto: config $(DIR_roken)
169         +${COMPILE_PART1} crypto/hcrypto ${COMPILE_PART2}
170
171 rfc3961: config hcrypto
172         +${COMPILE_PART1} crypto/rfc3961 ${COMPILE_PART2}
173
174 lwp: util lwp_depinstall
175         +${COMPILE_PART1} lwp ${COMPILE_PART2}
176
177 roken: config
178         +${COMPILE_PART1} roken ${COMPILE_PART2}
179
180 rxgen: $(DIR_roken) config
181         +${COMPILE_PART1} rxgen ${COMPILE_PART2}
182
183 rx: config lwp rxgen rx_depinstall
184         +${COMPILE_PART1} rx ${COMPILE_PART2}
185
186 rxstat: rx rxstat_depinstall
187         +${COMPILE_PART1} rxstat ${COMPILE_PART2}
188
189 rxtests: rxdebug
190 rxdebug: rx sys
191         +${COMPILE_PART1} rxdebug ${COMPILE_PART2}
192
193 fsint: cmd comerr rxgen rx lwp fsint_depinstall
194         +${COMPILE_PART1} fsint ${COMPILE_PART2}
195
196 export2: project 
197
198 export: 
199         @case ${SYS_NAME} in \
200         rs_aix*) \
201                 ${MAKE} export_build ; \
202         esac
203
204 export_build: fsint
205         +${COMPILE_PART1} export ${COMPILE_PART2}
206
207 afs: config export comerr afs_depinstall
208         +${COMPILE_PART1} afs ${COMPILE_PART2}
209
210 sys: cmd comerr afs hcrypto rx rxstat fsint auth sys_depinstall
211         +${COMPILE_PART1} sys ${COMPILE_PART2}
212
213 rxkad: cmd comerr hcrypto rx rxkad_depinstall
214         +${COMPILE_PART1} rxkad ${COMPILE_PART2}
215
216 auth: cmd comerr hcrypto lwp rx rxkad audit sys_depinstall auth_depinstall
217         +${COMPILE_PART1} auth ${COMPILE_PART2}
218
219 ubik: cmd comerr auth ubik_depinstall sys
220         +${COMPILE_PART1} ubik ${COMPILE_PART2}
221
222 tubik: ubik libafsrpc libafsauthent
223         +[ yes != "$(ENABLE_PTHREADED_UBIK)" ] || case ${SYS_NAME} in \
224         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
225                 ${COMPILE_PART1} tubik ${COMPILE_PART2} ;; \
226         *_darwin_[1-6][0-9]) \
227                 echo Not building MT ubik for ${SYS_NAME} ;; \
228         *_darwin_*) \
229                 ${COMPILE_PART1} tubik  ${COMPILE_PART2} ;; \
230         *) \
231                 echo Not building MT ubik for ${SYS_NAME} ;; \
232         esac
233
234 ubiktests: ubik
235
236 ptserver: cmd comerr ubik cmd comerr auth audit ptserver_depinstall
237         +${COMPILE_PART1} ptserver ${COMPILE_PART2}
238
239 tptserver: cmd comerr ptserver tubik libafsrpc libafsauthent
240         +[ yes != "$(ENABLE_PTHREADED_UBIK)" ] || case ${SYS_NAME} in \
241         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
242                 ${COMPILE_PART1} tptserver ${COMPILE_PART2} ;; \
243         *_darwin_[1-6][0-9]) \
244                 echo Not building MT ptserver for ${SYS_NAME} ;; \
245         *_darwin_*) \
246                 ${COMPILE_PART1} tptserver  ${COMPILE_PART2} ;; \
247         *) \
248                 echo Not building MT ptserver for ${SYS_NAME} ;; \
249         esac
250
251 kauth: cmd comerr ubik cmd auth comerr ptserver audit libacl kauth_depinstall sys_depinstall
252         +${COMPILE_PART1} kauth ${COMPILE_PART2}
253
254 libacl: cmd comerr ptserver libacl_depinstall
255         +${COMPILE_PART1} libacl ${COMPILE_PART2}
256
257 dir: cmd comerr libacl dir_depinstall
258         +${COMPILE_PART1} dir ${COMPILE_PART2}
259
260 # Removed from sgi_* case below:
261 # ${COMPILE_PART1} sgiefs ${COMPILE_PART2};;
262 sgiefs:
263         +case ${SYS_NAME} in \
264         sgi_*) \
265                 echo "SGI efs not supported" ;; \
266         *) \
267                 echo No efs stuff for ${SYS_NAME};; \
268         esac
269
270 vol: cmd comerr dir afs sgiefs $(DIR_roken)
271         +${COMPILE_PART1} vol ${COMPILE_PART2}
272
273 tsalvaged: vol libafsrpc libafsauthent cmd util
274         +case ${SYS_NAME} in \
275                 alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*|*nbsd2*|*_darwin_*) \
276                         ${COMPILE_PART1} tsalvaged ${COMPILE_PART2} ;; \
277                 *_darwin_*) \
278                         ${COMPILE_PART1} tsalvaged  ${COMPILE_PART2} ;; \
279                 *) \
280                         echo Not building MT tsalvaged for ${SYS_NAME} ;; \
281         esac
282
283
284 vlserver: cmd comerr vol audit vlserver_depinstall
285         +${COMPILE_PART1} vlserver ${COMPILE_PART2}
286
287 tvlserver: cmd comerr vol audit tubik libafsrpc libafsauthent tvlserver_depinstall
288         +[ yes != "$(ENABLE_PTHREADED_UBIK)" ] || case ${SYS_NAME} in \
289         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
290                 ${COMPILE_PART1} tvlserver ${COMPILE_PART2} ;; \
291         *_darwin_[1-6][0-9]) \
292                 echo Not building MT tvlserver for ${SYS_NAME} ;; \
293         *_darwin_*) \
294                 ${COMPILE_PART1} tvlserver  ${COMPILE_PART2} ;; \
295         *) \
296                 echo Not building MT tvlserver for ${SYS_NAME} ;; \
297         esac
298
299
300 viced: cmd comerr vlserver tvlserver audit
301         +${COMPILE_PART1} viced ${COMPILE_PART2}
302
303 tviced: cmd comerr viced vlserver tvlserver libafsrpc libafsauthent
304         +case ${SYS_NAME} in \
305         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
306                 ${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \
307         *) \
308                 echo Not building MT viced for ${SYS_NAME} ;; \
309         esac
310
311 dviced: cmd comerr viced vlserver tvlserver libafsrpc libafsauthent
312         +case ${SYS_NAME} in \
313         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
314                 ${COMPILE_PART1} dviced ${COMPILE_PART2} ;; \
315         *) \
316                 echo Not building DAFS viced for ${SYS_NAME} ;; \
317         esac
318
319 volser: cmd comerr tviced usd kauth audit
320         +${COMPILE_PART1} volser ${COMPILE_PART2}
321
322 tvolser: project tviced usd libafsrpc libafsauthent volser
323         +@case ${SYS_NAME} in                                           \
324         *_darwin_*|alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*obsd*)   \
325                 ${COMPILE_PART1} tvolser ${COMPILE_PART2} &&            \
326                 if [ "xyes" = "x$(ENABLE_PTHREADED_UNIK)" ] ; then      \
327                         $(MAKE) $(COMPILE_PART2B)_vos;                                          \
328                 fi;;                                                    \
329         *)                                                              \
330                 echo Not building MT volser for ${SYS_NAME} ;;          \
331         esac
332
333 dvolser: project tviced usd libafsrpc libafsauthent volser
334         +@case ${SYS_NAME} in                                           \
335         *_darwin_*|alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*obsd*)   \
336                 ${COMPILE_PART1} dvolser ${COMPILE_PART2} ;;            \
337         *)                                                              \
338                 echo Not building DAFS volser for ${SYS_NAME} ;;          \
339         esac
340
341 rxosdsrc: rxgen
342         +${COMPILE_PART1} rxosd ${COMPILE_PART2A} source
343
344 venus: cmd comerr volser ptserver libafscp
345         +${COMPILE_PART1} venus ${COMPILE_PART2}
346         +${COMPILE_PART1} venus/test ${COMPILE_PART2}
347
348 afsd: cmd comerr sys kauth @CLIENT_UAFS_DEP@
349         +${COMPILE_PART1} afsd ${COMPILE_PART2}
350
351 gtx: cmd comerr auth kauth
352         +set -x; \
353         if test "@LIB_curses@"; then \
354                 ${COMPILE_PART1} gtx ${COMPILE_PART2} ; \
355         else \
356                 echo Not building gtx, because no curses-headers found. ; \
357         fi
358
359 fsprobe: cmd comerr util fsint volser
360         +${COMPILE_PART1} fsprobe ${COMPILE_PART2}
361
362 scout: cmd comerr gtx fsprobe
363         +if test "@LIB_curses@"; then \
364                 ${COMPILE_PART1} scout ${COMPILE_PART2} ; \
365         else \
366                 echo Not building scout, because no curses-headers found. ; \
367         fi
368
369 uss: hcrypto kauth cmd comerr rx vlserver vol volser
370         +${COMPILE_PART1} uss ${COMPILE_PART2}
371
372 bozo: cmd comerr audit auth kauth volser
373         +${COMPILE_PART1} bozo ${COMPILE_PART2}
374
375 vfsck:  vol
376         +set -x; \
377         case ${SYS_NAME} in \
378         sgi_* | *linux* | rs_aix* | *_darwin* | ia64_hpux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* ) \
379                 echo skip vfsck for ${SYS_NAME} ;; \
380          * ) \
381                 ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \
382         esac
383
384 pam: auth shlibafsauthent shlibafsrpc
385         +set -x; \
386         if test "@HAVE_PAM@" = "yes"; then \
387                 ${COMPILE_PART1} pam ${COMPILE_PART2} ; \
388         else \
389                 echo Skipping pam for ${SYS_NAME} ; \
390         fi
391
392 tsm41: cmd comerr kauth rxkad
393         +set -x; \
394         case ${SYS_NAME} in \
395         rs_aix* ) \
396                 ${COMPILE_PART1} tsm41 ${COMPILE_PART2} ;; \
397         * ) \
398                 echo Skipping tsm41 for ${SYS_NAME} ;; \
399         esac
400
401 sgistuff: cmd comerr kauth rxkad
402         +set -x; \
403         case ${SYS_NAME} in \
404         sgi_* ) \
405                 ${COMPILE_PART1} sgistuff ${COMPILE_PART2} ;; \
406         * ) \
407                 echo Skipping sgistuff for ${SYS_NAME} ;; \
408         esac
409
410 aklog: auth comerr ptserver libafsauthent
411         +set -x; \
412         if test "@BUILD_KRB5@" = "yes"; then \
413                 ${COMPILE_PART1} aklog ${COMPILE_PART2} ; \
414         else \
415                 echo Skipping aklog for ${SYS_NAME} ; \
416         fi
417
418 authtools: pam tsm41 sgistuff aklog
419
420 platform: config cmd vol
421         +${COMPILE_PART1} platform ${COMPILE_PART2}
422
423 man-pages: config
424         +if test -d "doc/man-pages" ; then \
425                 cd doc/man-pages ${COMPILE_PART2} ; \
426         fi
427
428 #
429 # _depinstall targets - only build and install headers/sources that are needed by libafs/libuafs
430 #
431 # encode dependencies within the _depinstall targets as required
432 #
433 lwp_depinstall: config
434         +${COMPILE_PART1} lwp ${COMPILE_DEPINSTALL}
435
436 rx_depinstall: config
437         +${COMPILE_PART1} rx ${COMPILE_DEPINSTALL}
438
439 rxkad_depinstall: config comerr
440         +${COMPILE_PART1} rxkad ${COMPILE_DEPINSTALL}
441
442 ubik_depinstall: config comerr rxgen
443         +${COMPILE_PART1} ubik ${COMPILE_DEPINSTALL}
444
445 vlserver_depinstall: config rxgen ubik_depinstall auth_depinstall
446         +${COMPILE_PART1} vlserver ${COMPILE_DEPINSTALL}
447
448 tvlserver_depinstall: config rxgen ubik_depinstall auth_depinstall
449         +${COMPILE_PART1} tvlserver ${COMPILE_DEPINSTALL}
450
451 auth_depinstall: config rxgen comerr
452         +${COMPILE_PART1} auth ${COMPILE_DEPINSTALL}
453
454 fsint_depinstall: config rxgen
455         +${COMPILE_PART1} fsint ${COMPILE_DEPINSTALL}
456
457 rxstat_depinstall: config rxgen
458         +${COMPILE_PART1} rxstat ${COMPILE_DEPINSTALL}
459
460 libacl_depinstall: config
461         +${COMPILE_PART1} libacl ${COMPILE_DEPINSTALL}
462
463 afs_depinstall: config comerr
464         +${COMPILE_PART1} afs ${COMPILE_DEPINSTALL}
465
466 dir_depinstall: config
467         +${COMPILE_PART1} dir ${COMPILE_DEPINSTALL}
468
469 sys_depinstall: config rxgen
470         +${COMPILE_PART1} sys ${COMPILE_DEPINSTALL}
471
472 kauth_depinstall: config rxgen comerr
473         +${COMPILE_PART1} kauth ${COMPILE_DEPINSTALL}
474
475 ptserver_depinstall: config rxgen comerr
476         +${COMPILE_PART1} ptserver ${COMPILE_DEPINSTALL}
477
478 ${DEST}/bin/dedebug: dedebug
479         ${INSTALL} $? $@
480
481
482 #
483 # libafs build targets
484 #
485 libafs: config export rfc3961 hcrypto lwp_depinstall \
486         rx_depinstall vlserver_depinstall tvlserver_depinstall \
487         rxkad_depinstall fsint_depinstall \
488         libacl_depinstall afs_depinstall dir_depinstall \
489         rxstat_depinstall sys_depinstall auth_depinstall \
490         rxosdsrc
491         src/config/config src/libafs/MakefileProto.${MKAFS_OSTYPE} src/libafs/Makefile ${SYS_NAME}
492         +${COMPILE_PART1} libafs ${COMPILE_PART2}
493
494 libafs_tree: export lwp_depinstall rx_depinstall vlserver_depinstall tvlserver_depinstall rxkad_depinstall fsint_depinstall \
495                 libacl_depinstall afs_depinstall dir_depinstall rxstat_depinstall sys_depinstall auth_depinstall
496         ${TOP_SRCDIR}/config/make_libafs_tree.pl \
497                 -sn $(SYS_NAME) \
498                 -os $(MKAFS_OSTYPE) \
499                 -t @TOP_OBJDIR@/libafs_tree \
500                 -o @TOP_OBJDIR@ \
501                 -p @srcdir@
502
503 #
504 # libuafs build targets
505 #
506
507 libuafs_setup: config export
508         src/config/config src/libuafs/MakefileProto.${MKAFS_OSTYPE} src/libuafs/Makefile ${SYS_NAME}
509
510 libuafs: libuafs_setup vlserver_depinstall tvlserver_depinstall rx_depinstall fsint_depinstall \
511                 auth_depinstall dir_depinstall libacl_depinstall rxkad_depinstall \
512                 ubik_depinstall afs_depinstall kauth_depinstall ptserver_depinstall \
513                 rxstat_depinstall lwp_depinstall sys_depinstall cmd hcrypto
514         +set -x; \
515         case ${SYS_NAME} in \
516         hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| hp_ux11i | hp_ux112* | ia64_hpux112*) \
517                 echo Skipping libuafs for ${SYS_NAME} ;; \
518         * ) \
519                 ${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \
520         esac
521
522 afsweb: kauth
523         +${COMPILE_PART1} afsweb ${COMPILE_PART2}
524
525 update: cmd comerr auth sys
526         +${COMPILE_PART1} update ${COMPILE_PART2}
527
528 log: cmd comerr auth sys
529         +${COMPILE_PART1} log ${COMPILE_PART2}
530
531 bu_utils: cmd comerr usd
532         +${COMPILE_PART1} bu_utils ${COMPILE_PART2}
533
534 usd: cmd comerr
535         +${COMPILE_PART1} usd ${COMPILE_PART2}
536
537 bubasics: cmd comerr comerr rx
538         +${COMPILE_PART1} bubasics ${COMPILE_PART2}
539
540 butm: cmd comerr bubasics usd uss
541         +${COMPILE_PART1} butm ${COMPILE_PART2}
542
543 butc: cmd comerr bubasics butm budb bucoord cmd rxgen rx
544         +${COMPILE_PART1} butc ${COMPILE_PART2}
545
546 tbutc: cmd comerr bubasics butm budb bucoord cmd butc libadmin
547         +case ${SYS_NAME} in \
548         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
549                 ${COMPILE_PART1} tbutc ${COMPILE_PART2} ;; \
550         *) \
551                 echo Not building MT butc for ${SYS_NAME} ;; \
552         esac
553
554 budb: cmd comerr bubasics uss
555         +${COMPILE_PART1} budb ${COMPILE_PART2}
556
557 tbudb: budb
558         +[ yes != "$(ENABLE_PTHREADED_UBIK)" ] || case ${SYS_NAME} in \
559         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
560                 ${COMPILE_PART1} tbudb ${COMPILE_PART2} ;; \
561         *_darwin_[1-6][0-9]) \
562                 echo Not building MT budb for ${SYS_NAME} ;; \
563         *_darwin_*) \
564                 ${COMPILE_PART1} tbudb  ${COMPILE_PART2} ;; \
565         *) \
566                 echo Not building MT budb for ${SYS_NAME} ;; \
567         esac
568
569 bucoord: cmd comerr bubasics budb volser
570         +${COMPILE_PART1} bucoord ${COMPILE_PART2}
571
572 xstat: cmd comerr fsint viced
573         +${COMPILE_PART1} xstat ${COMPILE_PART2}
574
575 afsmonitor: cmd comerr gtx xstat
576         +set -x; \
577         if test "@LIB_curses@"; then \
578                 ${COMPILE_PART1} afsmonitor ${COMPILE_PART2} ; \
579         else \
580                 echo Not building afsmonitor, because no curses-headers found. ; \
581         fi
582
583 tests: rxtests ubiktests rpctestlib
584
585 # pthread based user space RX library
586 libafsrpc: rx rxkad rxstat fsint hcrypto
587         +case ${SYS_NAME} in \
588         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
589         ${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \
590         *_darwin_[1-6][0-9]) \
591                 echo Not building MT libafsrpc for ${SYS_NAME} ;; \
592         *_darwin_*) \
593                 ${COMPILE_PART1} libafsrpc  ${COMPILE_PART2} ;; \
594         *) \
595                 echo Not building MT libafsrpc for ${SYS_NAME} ;; \
596         esac
597
598 libafsauthent: ubik auth kauth libafsrpc
599         +case ${SYS_NAME} in \
600         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
601         ${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \
602         *_darwin_[1-6][0-9]) \
603                 echo Not building MT libafsauthent for ${SYS_NAME} ;; \
604         *_darwin_*) \
605                 ${COMPILE_PART1} libafsauthent  ${COMPILE_PART2} ;; \
606         *) \
607                 echo Not building MT libafsauthent for ${SYS_NAME} ;; \
608         esac
609
610 # pthread based user space RX library
611 shlibafsrpc: rx rxstat fsint rxkad hcrypto
612         +case ${SYS_NAME} in \
613         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*_darwin_1*|*nbsd*|*obsd*|*fbsd*) \
614         ${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \
615         *) \
616                 echo Not building shared libafsrpc for ${SYS_NAME} ;; \
617         esac
618
619 shlibafsauthent: ubik auth kauth shlibafsrpc
620         +case ${SYS_NAME} in \
621         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*_darwin_1*|*nbsd*|*obsd*|*fbsd*) \
622         ${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
623         *) \
624                 echo Not building shared libafsauthent for ${SYS_NAME} ;; \
625         esac
626
627 kopenafs: config sys
628         +${COMPILE_PART1} kopenafs ${COMPILE_PART2}
629
630 libadmin_real: 
631         +${COMPILE_PART1} libadmin ${COMPILE_PART2}
632         +${COMPILE_PART1} libadmin/adminutil ${COMPILE_PART2}
633         +${COMPILE_PART1} libadmin/vos ${COMPILE_PART2}
634         +${COMPILE_PART1} libadmin/client ${COMPILE_PART2}
635         +${COMPILE_PART1} libadmin/kas ${COMPILE_PART2}
636         +${COMPILE_PART1} libadmin/pts ${COMPILE_PART2}
637         +${COMPILE_PART1} libadmin/bos ${COMPILE_PART2}
638         +${COMPILE_PART1} libadmin/cfg ${COMPILE_PART2}
639         +${COMPILE_PART1} libadmin/test ${COMPILE_PART2}
640         +${COMPILE_PART1} libadmin/samples ${COMPILE_PART2}
641
642 libadmin: libafsauthent bozo
643         +case ${SYS_NAME} in \
644         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
645                         $(MAKE) libadmin_real ;; \
646         *_darwin_[1-6][0-9]) \
647                 echo Not building MT libadmin for ${SYS_NAME} ;; \
648         *_darwin_*) \
649                         $(MAKE) libadmin_real ;; \
650         *) \
651                 echo Not building MT libadmin for ${SYS_NAME} ;; \
652         esac
653
654 libjafs: libadmin
655         +case ${SYS_NAME} in \
656         alpha_dux*|sgi_*|sun4x_*|rs_aix*|*linux*|hp_ux110) \
657         ${COMPILE_PART1} JAVA/libjafs  ${COMPILE_PART2} ;; \
658         *) \
659                 echo Not building MT libjafs for ${SYS_NAME} ;; \
660         esac
661
662 libjafsadm: libjafs
663
664 jafs: libjafs
665
666 jafsadm: libjafsadm
667
668 build_tools: config des comerr rxgen
669         +${COMPILE_PART1} util ${COMPILE_PART2A} buildtools_clean
670
671 finale: project cmd comerr afsd butc tbutc tbudb @ENABLE_KERNEL_MODULE@ libuafs audit kauth log \
672         ptserver tptserver scout bu_utils ubik uss bozo @VFSCK@ volser tvolser tsalvaged \
673         dviced dvolser libafscp\
674         venus update xstat afsmonitor rxdebug libafsrpc rfc3961 hcrypto \
675         libafsauthent shlibafsrpc shlibafsauthent libadmin man-pages \
676         platform kopenafs authtools $(DIR_roken)
677         +${COMPILE_PART1} finale ${COMPILE_PART2}
678
679 finale_nolibafs: project cmd comerr afsd butc tbutc tbudb libuafs audit kauth log \
680         ptserver tptserver scout bu_utils ubik tubik uss bozo @VFSCK@ volser tvolser tsalvaged \
681         dviced dvolser libafscp\
682         venus update xstat afsmonitor rxdebug libafsrpc rfc3961 hcrypto \
683         libafsauthent shlibafsrpc shlibafsauthent libadmin man-pages \
684         platform kopenafs authtools $(DIR_roken)
685         +${COMPILE_PART1} finale ${COMPILE_PART2}
686
687 check test: finale
688         cd tests && $(MAKE) check
689
690 # Use washtool to ensure MakefileProto is current and obj/libafs exists.
691
692 force:
693
694 TARGET=finale
695 build: force
696         $(MAKE) $(TARGET) DEST=$(DEST) COMPILE_PART2B=$(COMPILE_PART2B) DESTDIR=$(DESTDIR)
697
698 kupdate: updatekdir libafs_setup libuafs_setup
699
700 blibafs:
701         $(MAKE) libafs
702
703 blibuafs:
704         $(MAKE) libuafs
705
706 bwebafs: sys
707         $(MAKE) libuafs
708
709 clean:
710         $(MAKE) clean2
711
712 clean2:
713         -${COMPILE_PART1} config ${COMPILE_CLEAN}
714         -${COMPILE_PART1} procmgmt ${COMPILE_CLEAN}
715         -${COMPILE_PART1} util ${COMPILE_CLEAN}
716         -${COMPILE_PART1} libafscp ${COMPILE_CLEAN}
717         -${COMPILE_PART1} audit ${COMPILE_CLEAN}
718         -${COMPILE_PART1} comerr ${COMPILE_CLEAN}
719         -${COMPILE_PART1} cmd ${COMPILE_CLEAN}
720         -${COMPILE_PART1} lwp ${COMPILE_CLEAN}
721         -${COMPILE_PART1} rxgen ${COMPILE_CLEAN}
722         -${COMPILE_PART1} rx ${COMPILE_CLEAN}
723         -${COMPILE_PART1} rxstat ${COMPILE_CLEAN}
724         -${COMPILE_PART1} fsint ${COMPILE_CLEAN}
725         -${COMPILE_PART1} export ${COMPILE_CLEAN}
726         -${COMPILE_PART1} afs ${COMPILE_CLEAN}
727         -${COMPILE_PART1} sys ${COMPILE_CLEAN}
728         -${COMPILE_PART1} rxkad ${COMPILE_CLEAN}
729         -${COMPILE_PART1} auth ${COMPILE_CLEAN}
730         -${COMPILE_PART1} ubik ${COMPILE_CLEAN}
731         -${COMPILE_PART1} tubik ${COMPILE_CLEAN}
732         -${COMPILE_PART1} ptserver ${COMPILE_CLEAN}
733         -${COMPILE_PART1} tptserver ${COMPILE_CLEAN}
734         -${COMPILE_PART1} kauth ${COMPILE_CLEAN}
735         -${COMPILE_PART1} libacl ${COMPILE_CLEAN}
736         -${COMPILE_PART1} dir ${COMPILE_CLEAN}
737         -${COMPILE_PART1} vol ${COMPILE_CLEAN}
738         -${COMPILE_PART1} vlserver ${COMPILE_CLEAN}
739         -${COMPILE_PART1} tvlserver ${COMPILE_CLEAN}
740         -${COMPILE_PART1} viced ${COMPILE_CLEAN}
741         -${COMPILE_PART1} tviced ${COMPILE_CLEAN}
742         -${COMPILE_PART1} dviced ${COMPILE_CLEAN}
743         -${COMPILE_PART1} volser ${COMPILE_CLEAN}
744         -${COMPILE_PART1} tvolser ${COMPILE_CLEAN}
745         -${COMPILE_PART1} dvolser ${COMPILE_CLEAN}
746         -${COMPILE_PART1} tsalvaged ${COMPILE_CLEAN}
747         -${COMPILE_PART1} venus ${COMPILE_CLEAN}
748         -${COMPILE_PART1} venus/test ${COMPILE_CLEAN}
749         -${COMPILE_PART1} afsd ${COMPILE_CLEAN}
750         -${COMPILE_PART1} gtx ${COMPILE_CLEAN}
751         -${COMPILE_PART1} fsprobe ${COMPILE_CLEAN}
752         -${COMPILE_PART1} scout ${COMPILE_CLEAN}
753         -${COMPILE_PART1} uss ${COMPILE_CLEAN}
754         -${COMPILE_PART1} bozo ${COMPILE_CLEAN}
755         -${COMPILE_PART1} vfsck ${COMPILE_CLEAN}
756         -${COMPILE_PART1} sgistuff ${COMPILE_CLEAN}
757         -${COMPILE_PART1} tsm41 ${COMPILE_CLEAN}
758         -${COMPILE_PART1} sia ${COMPILE_CLEAN}
759         -${COMPILE_PART1} aklog ${COMPILE_CLEAN}
760         -${COMPILE_PART1} pam ${COMPILE_CLEAN}
761         -${COMPILE_PART1} afsweb ${COMPILE_CLEAN}
762         -${COMPILE_PART1} update ${COMPILE_CLEAN}
763         -${COMPILE_PART1} log ${COMPILE_CLEAN}
764         -${COMPILE_PART1} bu_utils ${COMPILE_CLEAN}
765         -${COMPILE_PART1} usd ${COMPILE_CLEAN}
766         -${COMPILE_PART1} bubasics ${COMPILE_CLEAN}
767         -${COMPILE_PART1} butm ${COMPILE_CLEAN}
768         -${COMPILE_PART1} butc ${COMPILE_CLEAN}
769         -${COMPILE_PART1} tbutc ${COMPILE_CLEAN}
770         -${COMPILE_PART1} budb ${COMPILE_CLEAN}
771         -${COMPILE_PART1} tbudb ${COMPILE_CLEAN}
772         -${COMPILE_PART1} bucoord ${COMPILE_CLEAN}
773         -${COMPILE_PART1} xstat ${COMPILE_CLEAN}
774         -${COMPILE_PART1} afsmonitor ${COMPILE_CLEAN}
775         -${COMPILE_PART1} tests ${COMPILE_CLEAN}
776         -${COMPILE_PART1} rxdebug ${COMPILE_CLEAN}
777         -${COMPILE_PART1} libafsrpc ${COMPILE_CLEAN}
778         -${COMPILE_PART1} libafsauthent ${COMPILE_CLEAN}
779         -${COMPILE_PART1} shlibafsrpc ${COMPILE_CLEAN}
780         -${COMPILE_PART1} shlibafsauthent ${COMPILE_CLEAN}
781         -${COMPILE_PART1} kopenafs ${COMPILE_CLEAN}
782         -${COMPILE_PART1} platform ${COMPILE_CLEAN}
783         -${COMPILE_PART1} libadmin ${COMPILE_CLEAN}
784         -${COMPILE_PART1} libadmin/adminutil ${COMPILE_CLEAN}
785         -${COMPILE_PART1} libadmin/client ${COMPILE_CLEAN}
786         -${COMPILE_PART1} libadmin/vos ${COMPILE_CLEAN}
787         -${COMPILE_PART1} libadmin/kas ${COMPILE_CLEAN}
788         -${COMPILE_PART1} libadmin/pts ${COMPILE_CLEAN}
789         -${COMPILE_PART1} libadmin/bos ${COMPILE_CLEAN}
790         -${COMPILE_PART1} libadmin/cfg ${COMPILE_CLEAN}
791         -${COMPILE_PART1} libadmin/test ${COMPILE_CLEAN}
792         -${COMPILE_PART1} libadmin/samples ${COMPILE_CLEAN}
793         -${COMPILE_PART1} JAVA/libjafs ${COMPILE_CLEAN}
794         -${COMPILE_PART1} finale ${COMPILE_CLEAN}
795         -${COMPILE_PART1} libafs ${COMPILE_CLEAN}
796         -${COMPILE_PART1} libuafs ${COMPILE_CLEAN}
797         -${COMPILE_PART1} rxosd ${COMPILE_CLEAN}
798         -${COMPILE_PART1} tests ${COMPILE_CLEAN}
799         -${COMPILE_PART1} crypto/hcrypto ${COMPILE_CLEAN}
800         -${COMPILE_PART1} roken ${COMPILE_CLEAN}
801         -${COMPILE_PART1} crypto/rfc3961 ${COMPILE_CLEAN}
802         -(cd src/libafs; /bin/rm -rf afs afsint config rx)
803         -(cd src/libuafs; /bin/rm -rf afs afsint config rx)
804         -/bin/rm -rf ${TOP_INCDIR} ${TOP_LIBDIR} ${TOP_JLIBDIR}
805         -/bin/rm -rf libafs_tree ${SYS_NAME}
806
807 distclean: clean
808         /bin/rm -rf lib include
809         /bin/rm -f config.log config.cache config.status \
810         src/config/afsconfig.h src/config/stamp-h1 \
811         src/libafs/Makefile \
812         src/libuafs/Makefile \
813         Makefile \
814         src/afs/Makefile \
815         src/afsd/Makefile \
816         src/afsmonitor/Makefile \
817         src/afsweb/Makefile \
818         src/aklog/Makefile \
819         src/audit/Makefile \
820         src/auth/Makefile \
821         src/auth/test/Makefile \
822         src/bozo/Makefile \
823         src/bozo/test/Makefile \
824         src/bu_utils/Makefile \
825         src/bubasics/Makefile \
826         src/bucoord/Makefile \
827         src/budb/Makefile \
828         src/tbudb/Makefile \
829         src/butc/Makefile \
830         src/butm/Makefile \
831         src/cmd/Makefile \
832         src/cmd/test/Makefile \
833         src/comerr/Makefile \
834         src/comerr/test/Makefile \
835         src/config/Makefile \
836         src/config/Makefile.config \
837         src/config/Makefile.lwp \
838         src/config/Makefile.pthread \
839         src/config/Makefile.shared \
840         src/config/Makefile.version \
841         src/config/Makefile.version-CML \
842         src/config/Makefile.version-NOCML \
843         src/config/shlib-build \
844         src/config/shlib-install \
845         src/crypto/hcrypto/Makefile \
846         src/crypto/rfc3961/Makefile \
847         src/dir/Makefile \
848         src/dir/test/Makefile \
849         src/dviced/Makefile \
850         src/dvolser/Makefile \
851         src/export/Makefile \
852         src/finale/Makefile \
853         src/fsint/Makefile \
854         src/fsprobe/Makefile \
855         src/gtx/Makefile \
856         src/JAVA/libjafs/Makefile \
857         src/kauth/Makefile \
858         src/kauth/test/Makefile \
859         src/kopenafs/Makefile \
860         src/libacl/Makefile \
861         src/libacl/test/Makefile \
862         src/libadmin/Makefile \
863         src/libadmin/adminutil/Makefile \
864         src/libadmin/bos/Makefile \
865         src/libadmin/cfg/Makefile \
866         src/libadmin/cfg/test/Makefile \
867         src/libadmin/client/Makefile \
868         src/libadmin/kas/Makefile \
869         src/libadmin/pts/Makefile \
870         src/libadmin/samples/Makefile \
871         src/libadmin/test/Makefile \
872         src/libadmin/vos/Makefile \
873         src/libafs/Makefile.common \
874         src/libafs/MakefileProto.${MKAFS_OSTYPE} \
875         ${DARWIN_PLIST} \
876         src/libafsauthent/Makefile \
877         src/libafsrpc/Makefile \
878         src/libuafs/Makefile.common \
879         src/libuafs/MakefileProto.${MKAFS_OSTYPE} \
880         src/log/Makefile \
881         src/log/test/Makefile \
882         src/lwp/Makefile \
883         src/lwp/test/Makefile \
884         src/packaging/Debian/changelog \
885         src/packaging/MacOS/OpenAFS-debug.Description.plist \
886         src/packaging/MacOS/OpenAFS-debug.Info.plist \
887         src/packaging/MacOS/OpenAFS.Description.plist \
888         src/packaging/MacOS/OpenAFS.Info.plist \
889         src/packaging/MacOS/OpenAFS.info \
890         src/packaging/MacOS/buildpkg.sh \
891         src/packaging/RedHat/openafs.spec \
892         src/pam/Makefile \
893         src/platform/Makefile \
894         src/platform/${MKAFS_OSTYPE}/Makefile \
895         src/platform/DARWIN/growlagent/Makefile \
896         src/procmgmt/Makefile \
897         src/procmgmt/test/Makefile \
898         src/ptserver/Makefile \
899         src/tptserver/Makefile \
900         src/roken/Makefile \
901         src/rx/Makefile \
902         src/rx/bulk.example/Makefile \
903         src/rx/bulktest/Makefile \
904         src/rx/multi.example/Makefile \
905         src/rx/simple.example/Makefile \
906         src/rx/test/Makefile \
907         src/rxdebug/Makefile \
908         src/rxgen/Makefile \
909         src/rxkad/Makefile \
910         src/rxkad/test/Makefile \
911         src/rxosd/Makefile \
912         src/rxstat/Makefile \
913         src/scout/Makefile \
914         src/sgistuff/Makefile \
915         src/shlibafsauthent/Makefile \
916         src/shlibafsrpc/Makefile \
917         src/sys/Makefile \
918         src/tbutc/Makefile \
919         src/tests/Makefile \
920         src/tests/run-tests \
921         src/tests/auth/Makefile \
922         src/tsalvaged/Makefile \
923         src/tsm41/Makefile \
924         src/tviced/Makefile \
925         src/tvolser/Makefile \
926         src/ubik/Makefile \
927         src/tubik/Makefile \
928         src/update/Makefile \
929         src/usd/Makefile \
930         src/usd/test/Makefile \
931         src/uss/Makefile \
932         src/util/Makefile \
933         src/util/test/Makefile \
934         src/libafscp/Makefile \
935         src/venus/Makefile \
936         src/venus/test/Makefile \
937         src/vfsck/Makefile \
938         src/viced/Makefile \
939         src/vlserver/Makefile \
940         src/tvlserver/Makefile \
941         src/vol/Makefile \
942         src/vol/test/Makefile \
943         src/volser/Makefile \
944         src/xstat/Makefile  \
945         tests/Makefile \
946         tests/rpctestlib/Makefile \
947         tests/tap/Makefile \
948         tests/auth/Makefile \
949         tests/cmd/Makefile \
950         tests/common/Makefile \
951         tests/util/Makefile \
952         src/helper-splint.sh
953         if test -d doc/man-pages ; then \
954             rm -f doc/man-pages/Makefile doc/man-pages/install-man ; \
955         fi
956
957 pristine: distclean
958         /bin/rm -f src/config/afsconfig.h.in configure configure-libafs aclocal.m4
959
960 maintainer-clean: pristine