tbutc-make-tsm-a-configure-option-20011009
[openafs.git] / src / tbutc / 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 DEST=@DEST@
9 TOP_INCDIR=@TOP_INCDIR@
10 TOP_LIBDIR=@TOP_LIBDIR@
11 prefix=@prefix@
12 exec_prefix=@exec_prefix@
13 bindir=@bindir@
14 sbindir=@sbindir@
15 libexecdir=@libexecdir@
16 libdir=@libdir@
17 includedir=@includedir@
18 mandir=@mandir@
19 afssrvbindir=@afssrvbindir@
20 afssrvsbindir=@afssrvsbindir@
21 afssrvlibexecdir=@afssrvlibexecdir@
22 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
23 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
24 TOP_SRCDIR=@TOP_SRCDIR@
25 SYS_NAME=@AFS_SYSNAME@
26
27 SHELL    =/bin/sh
28
29 include ../config/Makefile.${SYS_NAME}
30
31 BUTMOBJS    =file_tm.o
32 BUTMLIBS    =libbutm.a
33 BUTMINCLS   =${TOP_INCDIR}/afs/com_err.h ${TOP_INCDIR}/afs/butm.h
34 BUTMINCLUDE =-I${TOP_INCDIR}
35
36 CC      = ${MT_CC}
37 CFLAGS  = ${DBG} -w -I${TOP_SRCDIR}/config ${MT_CFLAGS} @XBSA_CFLAGS@ ${BUTMINCLUDE}
38
39 LDFLAGS = ${DBG} ${XLDFLAGS}
40
41 LWP     =../lwp
42 BUTM    =../butm
43 BUTC    =../butc
44 BUCOORD = ../bucoord
45 VOLSER  = ../volser
46
47 BUCOORDOBJS=ubik_db_if.o ${BUCOORD}/volstub.o ${BUCOORD}/dlq.o \
48             ${BUCOORD}/status.o ${BUCOORD}/bucoord_errs.o
49
50 VOLSERLIBOBJ=${VOLSER}/volint.cs.o  vsprocs.o              ${VOLSER}/vsutils.o \
51             ${VOLSER}/lockprocs.o  ${VOLSER}/volint.xdr.o ${VOLSER}/volerr.o \
52             ${VOLSER}/volint.ss.o  AFS_component_version_number.o 
53 VOLSERLIBS  =libvolser.a
54
55 LWPOBJS     =lock.o
56
57 BUTCOBJS   =dbentries.o tcprocs.o lwps.o tcmain.o list.o recoverDb.o \
58             tcudbprocs.o dump.o tcstatus.o butc_xbsa.o \
59             ${LWPOBJS} ${BUCOORDOBJS}
60
61 BUTCINCLS=${TOP_INCDIR}/afs/partition.h \
62             ${TOP_INCDIR}/afs/volume.h \
63             ${TOP_INCDIR}/afs/vlserver.h \
64             ${TOP_INCDIR}/rx/rx.h \
65             ${TOP_INCDIR}/rx/xdr.h \
66             ${TOP_INCDIR}/afs/keys.h \
67             ${TOP_INCDIR}/afs/cellconfig.h \
68             ${TOP_INCDIR}/ubik.h \
69             ${TOP_INCDIR}/afs/cmd.h \
70             ${TOP_INCDIR}/afs/butc.h \
71             ${TOP_INCDIR}/afs/tcdata.h \
72             ${TOP_INCDIR}/afs/bubasics.h \
73             ${TOP_INCDIR}/afs/butm.h
74
75 BUTCINCLUDE=-I. -I${TOP_INCDIR}
76 BUTCLIBS=${TOP_LIBDIR}/libbudb.a \
77             ${TOP_LIBDIR}/libbubasics.a \
78             ${VOLSERLIBS} \
79             ${BUTMLIBS} \
80             ${TOP_LIBDIR}/libvldb.a \
81             ${TOP_LIBDIR}/libafsauthent.a \
82             ${TOP_LIBDIR}/libafsrpc.a \
83             ${TOP_LIBDIR}/libcmd.a \
84             ${TOP_LIBDIR}/util.a \
85             ${TOP_LIBDIR}/libusd.a \
86             ${TOP_LIBDIR}/libprocmgmt.a \
87             ${TOP_LIBDIR}/librx.a
88
89 #
90 # Build targets
91 #
92
93 all: butc
94
95 butc: ${BUTCOBJS} ${BUTCLIBS}
96         ${CC} ${CFLAGS} ${BUTCOBJS} ${BUTCLIBS} ${MTLIBS} ${XLIBS} -o butc
97
98 libvolser.a: vsprocs.o ${VOLSERLIBOBJ}
99         -$(RM) -f $@
100         $(AR) crv $@ vsprocs.o ${VOLSERLIBOBJ}
101         $(RANLIB) $@
102
103 libbutm.a: ${BUTMOBJS} AFS_component_version_number.o
104         -$(RM) -f libbutm.a
105         $(AR) crv libbutm.a $(BUTMOBJS) AFS_component_version_number.o
106         ${RANLIB} libbutm.a
107
108 dbentries.o: ${BUTC}/dbentries.c ${BUTCINCLS}
109         ${CC} ${CFLAGS} -c ${BUTC}/dbentries.c
110
111 tcprocs.o: ${BUTC}/tcprocs.c ${BUTCINCLS}
112         ${CC} ${CFLAGS} -c ${BUTC}/tcprocs.c
113
114 lwps.o: ${BUTC}/lwps.c ${BUTCINCLS}
115         ${CC} ${CFLAGS} -c ${BUTC}/lwps.c
116
117 tcmain.o: ${BUTC}/tcmain.c ${BUTCINCLS} AFS_component_version_number.c
118         ${CC} ${CFLAGS} -c ${BUTC}/tcmain.c
119
120 list.o: ${BUTC}/list.c ${BUTCINCLS}
121         ${CC} ${CFLAGS} -c ${BUTC}/list.c
122
123 recoverDb.o: ${BUTC}/recoverDb.c ${BUTCINCLS}
124         ${CC} ${CFLAGS} -c ${BUTC}/recoverDb.c
125
126 tcudbprocs.o: ${BUTC}/tcudbprocs.c ${BUTCINCLS}
127         ${CC} ${CFLAGS} -c ${BUTC}/tcudbprocs.c
128
129 dump.o: ${BUTC}/dump.c ${BUTCINCLS}
130         ${CC} ${CFLAGS} -c ${BUTC}/dump.c
131
132 tcstatus.o: ${BUTC}/tcstatus.c ${BUTCINCLS}
133         ${CC} ${CFLAGS} -c ${BUTC}/tcstatus.c
134
135 butc_xbsa.o: ${BUTC}/butc_xbsa.c ${BUTC}/butc_xbsa.h ${BUTCINCLS}
136         ${CC} ${CFLAGS} -c ${BUTC}/butc_xbsa.c
137
138 ubik_db_if.o: ${BUCOORD}/ubik_db_if.c
139         ${CC} ${CFLAGS} -c ${BUCOORD}/ubik_db_if.c
140
141 vsprocs.o: ${VOLSER}/vsprocs.c
142         ${CC} ${CFLAGS} -c ${VOLSER}/vsprocs.c
143
144 lock.o: ${LWP}/lock.c
145         ${CC} ${CFLAGS} -c ${LWP}/lock.c
146
147 file_tm.o: ${BUTM}/file_tm.c ${BUTMINCLS}
148         ${CC} ${CFLAGS} -c ${BUTM}/file_tm.c
149
150 #
151 # Install targets
152 #
153 install: ${DESTDIR}${sbindir}/butc
154 dest: ${DEST}/etc/butc
155
156 ${DEST}/etc/butc: butc
157         ${INSTALL} $? $@
158
159 ${DESTDIR}${sbindir}/butc: butc
160         ${INSTALL} $? $@
161
162 #
163 # Misc targets
164 #
165 include ../config/Makefile.version
166
167 clean:
168         $(RM) -f *.o *.a core AFS_component_version_number.c butc
169