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