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