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