6967796a37d856df4623af4534de7cb72f1690e5
[openafs.git] / src / tubik / 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 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.pthread
11
12 INSTALL = @INSTALL@
13 INSTALL_DATA = @INSTALL_DATA@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@
15 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16 HELPER_SPLINT=@HELPER_SPLINT@
17
18 UBIK=$(srcdir)/../ubik
19 RX=$(srcdir)/../rx
20 UTIL=$(srcdir)/../util
21
22 LIBOBJS=disk.o  remote.o beacon.o recovery.o ubik.o  vote.o lock.o phys.o \
23         ubik_int.cs.o ubik_int.ss.o ubik_int.xdr.o ubikcmd.o \
24         ubikclient.o uerrors.o uinit.o
25
26 INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
27         ${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
28         ${TOP_INCDIR}/lock.h ubik.h ubik_int.h utst_int.h
29
30 RXOBJS = rx_pthread.o
31
32 UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
33        volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o
34
35 LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a \
36      ${TOP_LIBDIR}/libafscom_err.a ${TOP_LIBDIR}/libcmd.a \
37      ${TOP_LIBDIR}/libsys.a ${XLIBS} ${MT_LIBS}
38
39 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
40
41 depinstall: \
42         ubik_int.cs.c ubik_int.xdr.c \
43         ${TOP_INCDIR}/ubik.h \
44         ${TOP_INCDIR}/ubik_int.h
45
46 #
47 # get the pthreaded rx stuff compiled here
48 #
49
50 CFLAGS_rx_pthread.o = -DDPF_FSLOG
51 rx_pthread.o: ${RX}/rx_pthread.c
52         $(AFS_CCRULE) $(RX)/rx_pthread.c
53
54 #
55 # get the pthreaded util stuff compiled here.  we do this instead of
56 # using the non-pthreaded libutil.a.  There probably should be a
57 # pthreaded version of this library, as we are doing with ubik itself, but...
58 #
59
60 assert.o: ${UTIL}/assert.c
61         $(AFS_CCRULE) $(UTIL)/assert.c
62
63 uuid.o: ${UTIL}/uuid.c
64         $(AFS_CCRULE) $(UTIL)/uuid.c
65
66 serverLog.o: ${UTIL}/serverLog.c
67         $(AFS_CCRULE) $(UTIL)/serverLog.c
68
69 fileutil.o: ${UTIL}/fileutil.c
70         $(AFS_CCRULE) $(UTIL)/fileutil.c
71
72 volparse.o: ${UTIL}/volparse.c
73         $(AFS_CCRULE) $(UTIL)/volparse.c
74
75 flipbase64.o: ${UTIL}/flipbase64.c
76         $(AFS_CCRULE) $(UTIL)/flipbase64.c
77
78 netutils.o: ${UTIL}/netutils.c
79         $(AFS_CCRULE) $(UTIL)/netutils.c
80
81 dirpath.o: ${UTIL}/dirpath.c
82         $(AFS_CCRULE) $(UTIL)/dirpath.c
83
84 softsig.o: ${UTIL}/softsig.c
85         $(AFS_CCRULE) $(UTIL)/softsig.c
86
87 hostparse.o: ${UTIL}/hostparse.c
88         $(AFS_CCRULE) $(UTIL)/hostparse.c
89
90 pthread_glock.o: ${UTIL}/pthread_glock.c
91         $(AFS_CCRULE) $(UTIL)/pthread_glock.c
92
93 #
94 # insert comments here
95 #
96
97 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
98         $(AFS_LDRULE) utst_server.o utst_int.ss.o utst_int.xdr.o \
99                 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
100
101 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
102         $(AFS_LDRULE) utst_client.o utst_int.cs.o utst_int.xdr.o \
103                 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
104
105 udebug: udebug.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
106         $(AFS_LDRULE) udebug.o libubik_pthread.a \
107                 $(LIBS) $(LIB_hcrypto) $(LIB_roken)
108
109 ubik_int.cs.c: ${UBIK}/ubik_int.xg
110         ${RXGEN} -A -x -C -o $@ ${UBIK}/ubik_int.xg
111
112 ubik_int.ss.c: ${UBIK}/ubik_int.xg
113         ${RXGEN} -A -x -S -o $@ ${UBIK}/ubik_int.xg
114
115 ubik_int.xdr.c: ${UBIK}/ubik_int.xg
116         ${RXGEN} -A -x -c -o $@ ${UBIK}/ubik_int.xg
117
118 ubik_int.h: ${UBIK}/ubik_int.xg
119         ${RXGEN} -A -x -h -o $@ ${UBIK}/ubik_int.xg
120
121 ubik_int.cs.c: ubik_int.h
122 ubik_int.ss.c: ubik_int.h
123 ubik_int.xdr.c: ubik_int.h
124
125 Kubik_int.cs.c: ${UBIK}/ubik_int.xg Kubik_int.h
126         ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${UBIK}/ubik_int.xg
127  
128 Kubik_int.xdr.c: ${UBIK}/ubik_int.xg
129         ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${UBIK}/ubik_int.xg
130  
131 Kubik_int.h: ${UBIK}/ubik_int.xg
132         ${RXGEN} -A -x -k -h -o Kubik_int.h ${UBIK}/ubik_int.xg
133
134 utst_int.ss.o: utst_int.ss.c
135 utst_int.cs.o: utst_int.cs.c
136 utst_int.xdr.o: utst_int.xdr.c
137
138 utst_int.cs.c: ${UBIK}/utst_int.xg
139         ${RXGEN} -A -C -u -o $@ ${UBIK}/utst_int.xg
140
141 utst_int.ss.c: ${UBIK}/utst_int.xg
142         ${RXGEN} -A -S -o $@ ${UBIK}/utst_int.xg
143
144 utst_int.xdr.c: ${UBIK}/utst_int.xg
145         ${RXGEN} -A -c -o $@ ${UBIK}/utst_int.xg
146
147 utst_int.h: ${UBIK}/utst_int.xg
148         ${RXGEN} -A -h -u -o $@ ${UBIK}/utst_int.xg
149
150 utst_int.cs.c: utst_int.h
151 utst_int.ss.c: utst_int.h
152 utst_int.xdr.c: utst_int.h
153
154 utst_server.o: ${UBIK}/utst_server.c
155         ${AFS_CCRULE} ${UBIK}/utst_server.c
156
157 utst_client.o: ${UBIK}/utst_client.c
158         ${AFS_CCRULE} ${UBIK}/utst_client.c
159
160 udebug.o: ${UBIK}/udebug.c
161         ${AFS_CCRULE} ${UBIK}/udebug.c
162
163 uerrors.c ubik.h: ${UBIK}/uerrors.et ${UBIK}/ubik.p.h
164         $(RM) -f ubik.h uerrors.c
165         ${COMPILE_ET} -p ${UBIK} uerrors -h ubik
166
167 libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
168         -$(RM) -f $@
169         $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
170         $(RANLIB) $@
171
172 disk.o: ${UBIK}/disk.c
173         $(AFS_CCRULE) $(UBIK)/disk.c
174
175 uinit.o: ${UBIK}/uinit.c
176         $(AFS_CCRULE) $(UBIK)/uinit.c
177
178 remote.o: ${UBIK}/remote.c
179         $(AFS_CCRULE) $(UBIK)/remote.c
180
181 beacon.o: ${UBIK}/beacon.c
182         $(AFS_CCRULE) $(UBIK)/beacon.c
183
184 lock.o: ${UBIK}/lock.c
185         $(AFS_CCRULE) $(UBIK)/lock.c
186
187 recovery.o: ${UBIK}/recovery.c
188         $(AFS_CCRULE) $(UBIK)/recovery.c
189
190 ubik.o: ${UBIK}/ubik.c
191         $(AFS_CCRULE) $(UBIK)/ubik.c
192
193 phys.o: ${UBIK}/phys.c
194         $(AFS_CCRULE) $(UBIK)/phys.c
195
196 vote.o: ${UBIK}/vote.c
197         $(AFS_CCRULE) $(UBIK)/vote.c
198
199 ubikcmd.o: ${UBIK}/ubikcmd.c
200         $(AFS_CCRULE) $(UBIK)/ubikcmd.c
201
202 ubikclient.o: ${UBIK}/ubikclient.c
203         $(AFS_CCRULE) $(UBIK)/ubikclient.c
204 ubik_int.xdr.o: ubik_int.xdr.c
205
206 #
207 # Installation targets
208 #
209 test: all
210
211 install: ${DESTDIR}${libdir}/libubik_pthread.a udebug
212         ${INSTALL} udebug ${DESTDIR}${bindir}/udebug
213         ${INSTALL} udebug ${DESTDIR}${afssrvbindir}/udebug
214
215 ${DEST}/bin/udebug ${DEST}/root.server/usr/afs/bin/udebug: udebug
216         ${INSTALL} $? $@
217
218 ${DEST}/lib/libubik_pthread.a: libubik_pthread.a
219         ${INSTALL} $? $@
220
221 ${DEST}/include/ubik.h: ubik.h
222         ${INSTALL} $? $@
223
224 ${DEST}/include/ubik_int.h: ubik_int.h
225         ${INSTALL} $? $@
226
227 #
228 # Misc. targets
229 #
230 clean:
231         $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
232         $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
233
234 include ../config/Makefile.version
235
236
237 ${DESTDIR}${libdir}/libubik_pthread.a: libubik_pthread.a
238         ${INSTALL} $? $@
239
240 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
241         ${INSTALL} $? $@
242
243 ${DESTDIR}${includedir}/ubik.h: ubik.h
244         ${INSTALL} $? $@
245
246 ${TOP_INCDIR}/ubik.h: ubik.h
247         ${INSTALL} $? $@
248
249 ${DESTDIR}${includedir}/ubik_int.h: ubik_int.h
250         ${INSTALL} $? $@
251
252 ${TOP_INCDIR}/ubik_int.h: ubik_int.h
253         ${INSTALL} $? $@
254
255 dest: \
256         ${DEST}/lib/libubik_pthread.a \
257         ${DEST}/bin/udebug \
258         ${DEST}/root.server/usr/afs/bin/udebug
259