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