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