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