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