cmd: Tidy up -help output
[openafs.git] / src / butc / 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 include @TOP_OBJDIR@/src/config/Makefile.lwp
13
14 INSTALL = @INSTALL@
15 INSTALL_DATA = @INSTALL_DATA@
16 INSTALL_PROGRAM = @INSTALL_PROGRAM@
17 INSTALL_SCRIPT = @INSTALL_SCRIPT@
18
19 INCLS=${TOP_INCDIR}/afs/partition.h ${TOP_INCDIR}/afs/volume.h \
20         ${TOP_INCDIR}/afs/vlserver.h ${TOP_INCDIR}/rx/rx.h \
21         ${TOP_INCDIR}/rx/xdr.h ${TOP_INCDIR}/afs/keys.h \
22         ${TOP_INCDIR}/afs/cellconfig.h ${TOP_INCDIR}/ubik.h \
23         ${TOP_INCDIR}/afs/cmd.h ${TOP_INCDIR}/afs/butc.h \
24         ${TOP_INCDIR}/afs/tcdata.h ${TOP_INCDIR}/afs/bubasics.h \
25         ${TOP_INCDIR}/afs/butm.h
26
27 HACKS=${TOP_LIBDIR}/libdir.a
28
29 LIBS=${TOP_LIBDIR}/libbudb.a \
30         $(TOP_LIBDIR)/libbxdb.a \
31         ${TOP_LIBDIR}/libbubasics.a \
32         ${TOP_LIBDIR}/libbutm.a \
33         ${TOP_LIBDIR}/libvolser.a \
34         ${TOP_LIBDIR}/libvldb.a \
35         ${TOP_LIBDIR}/vlib.a \
36         ${TOP_LIBDIR}/libacl.a \
37         ${TOP_LIBDIR}/libprot.a      \
38         ${TOP_LIBDIR}/libkauth.a \
39         ${TOP_LIBDIR}/libubik.a \
40         ${TOP_LIBDIR}/libauth.a \
41         ${TOP_LIBDIR}/librxkad.a \
42         ${TOP_LIBDIR}/libsys.a  \
43         ${TOP_LIBDIR}/librx.a \
44         ${TOP_LIBDIR}/libsys.a  \
45         ${TOP_LIBDIR}/liblwp.a \
46         ${TOP_LIBDIR}/libcmd.a \
47         ${TOP_LIBDIR}/libafscom_err.a \
48         ${TOP_LIBDIR}/libafshcrypto_lwp.a \
49         ${TOP_LIBDIR}/libusd.a \
50         ${TOP_LIBDIR}/util.a \
51         ${TOP_LIBDIR}/libprocmgmt.a
52
53 TESTOBJS=test.o
54
55 SOBJS=dbentries.o tcprocs.o lwps.o tcmain.o list.o recoverDb.o tcudbprocs.o \
56         dump.o tcstatus.o
57
58 all: butc read_tape
59
60 butc_test: ${TESTOBJS} ${LIBS} ${INCLS} ${HACKS}
61         $(AFS_LDRULE) ${TESTOBJS} ${LIBS} $(LIB_roken) ${XLIBS}
62
63 tdump: tdump.c AFS_component_version_number.c
64         $(CC) $(AFS_CPPFLAGS) $(AFS_CFLAGS) $(AFS_LDFLAGS) \
65                 ${srcdir}/tdump.c -o tdump
66
67 butc: ${SOBJS} ${LIBS} ${INCLS} ${HACKS}
68         @case ${SYS_NAME} in \
69           rs_aix*) $(AFS_LDRULE) ${SOBJS} ${LIBS} $(LIB_roken) ${XLIBS} \
70                 /usr/lib/libc_r.a ;; \
71           *)       $(AFS_LDRULE) ${SOBJS} ${LIBS} $(LIB_roken) ${XLIBS} ;; \
72         esac
73
74 tcmain.o: tcmain.c ${INCLS} AFS_component_version_number.c
75 dbentries.o: dbentries.c ${INCLS}
76 tcprocs.o: tcprocs.c ${INCLS}
77 test.o: test.c ${INCLS} AFS_component_version_number.c
78 lwps.o: lwps.c ${INCLS}
79 list.o: list.c ${INCLS}
80 recoverDb.o: recoverDb.c ${INCLS}
81 tcudbprocs.o: tcudbprocs.c ${INCLS}
82 dump.o: dump.c ${INCLS}
83 tcstatus.o: tcstatus.c ${INCLS}
84
85 read_tape: read_tape.c
86         $(CC) $(AFS_CPPFLAGS) $(AFS_CFLAGS) $(AFS_LDFLAGS) \
87                 -o read_tape ${srcdir}/read_tape.c \
88                 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libusd.a \
89                 ${TOP_LIBDIR}/util.a $(LIB_roken)
90
91 # Errors
92 CFLAGS_tcudbprocs.o=@CFLAGS_NOERROR@
93
94 clean:
95         $(RM) -f butc *.o butc_test core tdump read_tape AFS_component_version_number.c
96
97 install: butc read_tape
98         ${INSTALL} -d ${DESTDIR}${sbindir}
99         @case ${SYS_NAME} in \
100         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux*) \
101                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
102         *_darwin_[1-6][0-9]) \
103                 echo ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ; \
104                 ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ;; \
105         *_darwin_*) \
106                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
107         *) \
108                 echo ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ; \
109                 ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ;; \
110         esac
111         ${INSTALL_PROGRAM} read_tape ${DESTDIR}${sbindir}/read_tape
112
113 dest: butc read_tape
114         ${INSTALL} -d ${DEST}/etc
115         @case ${SYS_NAME} in \
116         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux*) \
117                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
118         *_darwin_[1-6][0-9]) \
119                 echo ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ; \
120                 ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ;; \
121         *_darwin_*) \
122                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
123         *) \
124                 echo ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ; \
125                 ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ;; \
126         esac
127         ${INSTALL_PROGRAM} read_tape ${DEST}/etc/read_tape
128
129 include ../config/Makefile.version