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