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