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