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