1 # Copyright 2000, International Business Machines Corporation and others.
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
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.pthread
12 HELPER_SPLINT=@HELPER_SPLINT@
13 ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
15 UBIK=$(srcdir)/../ubik
17 UTIL=$(srcdir)/../util
19 LIBOBJS=disk.o remote.o beacon.o recovery.o ubik.o vote.o lock.o phys.o \
20 ubik_int.cs.o ubik_int.ss.o ubik_int.xdr.o ubikcmd.o \
21 ubikclient.o uerrors.o uinit.o
23 INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
24 ${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
25 ${TOP_INCDIR}/lock.h ubik.h ubik_int.h utst_int.h
29 UTILOBJS=uuid.o serverLog.o fileutil.o dirpath.o \
30 volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o \
33 LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a \
34 ${TOP_LIBDIR}/libafscom_err.a ${TOP_LIBDIR}/libcmd.a \
35 ${TOP_LIBDIR}/libsys.a \
36 $(top_builddir)/src/opr/liboafs_opr.la \
39 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
42 ubik_int.cs.c ubik_int.xdr.c \
43 ${TOP_INCDIR}/ubik.h \
44 ${TOP_INCDIR}/ubik_int.h
47 # get the pthreaded rx stuff compiled here
50 CFLAGS_rx_pthread.o = -DDPF_FSLOG
51 rx_pthread.o: ${RX}/rx_pthread.c
52 $(AFS_CCRULE) $(RX)/rx_pthread.c
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...
60 uuid.o: ${UTIL}/uuid.c
61 $(AFS_CCRULE) $(UTIL)/uuid.c
63 serverLog.o: ${UTIL}/serverLog.c
64 $(AFS_CCRULE) $(UTIL)/serverLog.c
66 fileutil.o: ${UTIL}/fileutil.c
67 $(AFS_CCRULE) $(UTIL)/fileutil.c
69 volparse.o: ${UTIL}/volparse.c
70 $(AFS_CCRULE) $(UTIL)/volparse.c
72 flipbase64.o: ${UTIL}/flipbase64.c
73 $(AFS_CCRULE) $(UTIL)/flipbase64.c
75 dirpath.o: ${UTIL}/dirpath.c
76 $(AFS_CCRULE) $(UTIL)/dirpath.c
78 softsig.o: ${UTIL}/softsig.c
79 $(AFS_CCRULE) $(UTIL)/softsig.c
81 hostparse.o: ${UTIL}/hostparse.c
82 $(AFS_CCRULE) $(UTIL)/hostparse.c
84 pthread_glock.o: ${UTIL}/pthread_glock.c
85 $(AFS_CCRULE) $(UTIL)/pthread_glock.c
87 pthread_threadname.o: ${UTIL}/pthread_threadname.c
88 $(AFS_CCRULE) $(UTIL)/pthread_threadname.c
91 # insert comments here
94 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
95 $(LT_LDRULE_static) utst_server.o utst_int.ss.o utst_int.xdr.o \
96 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
98 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
99 $(LT_LDRULE_static) utst_client.o utst_int.cs.o utst_int.xdr.o \
100 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
102 udebug: udebug.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
103 $(LT_LDRULE_static) udebug.o libubik_pthread.a \
104 $(LIBS) $(LIB_hcrypto) $(LIB_roken)
106 ubik_int.cs.c: ${UBIK}/ubik_int.xg
107 ${RXGEN} -A -x -C -o $@ ${UBIK}/ubik_int.xg
109 ubik_int.ss.c: ${UBIK}/ubik_int.xg
110 ${RXGEN} -A -x -S -o $@ ${UBIK}/ubik_int.xg
112 ubik_int.xdr.c: ${UBIK}/ubik_int.xg
113 ${RXGEN} -A -x -c -o $@ ${UBIK}/ubik_int.xg
115 ubik_int.h: ${UBIK}/ubik_int.xg
116 ${RXGEN} -A -x -h -o $@ ${UBIK}/ubik_int.xg
118 ubik_int.cs.c: ubik_int.h
119 ubik_int.ss.c: ubik_int.h
120 ubik_int.xdr.c: ubik_int.h
122 Kubik_int.cs.c: ${UBIK}/ubik_int.xg Kubik_int.h
123 ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${UBIK}/ubik_int.xg
125 Kubik_int.xdr.c: ${UBIK}/ubik_int.xg
126 ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${UBIK}/ubik_int.xg
128 Kubik_int.h: ${UBIK}/ubik_int.xg
129 ${RXGEN} -A -x -k -h -o Kubik_int.h ${UBIK}/ubik_int.xg
131 utst_int.ss.o: utst_int.ss.c
132 utst_int.cs.o: utst_int.cs.c
133 utst_int.xdr.o: utst_int.xdr.c
135 utst_int.cs.c: ${UBIK}/utst_int.xg
136 ${RXGEN} -A -C -u -o $@ ${UBIK}/utst_int.xg
138 utst_int.ss.c: ${UBIK}/utst_int.xg
139 ${RXGEN} -A -S -o $@ ${UBIK}/utst_int.xg
141 utst_int.xdr.c: ${UBIK}/utst_int.xg
142 ${RXGEN} -A -c -o $@ ${UBIK}/utst_int.xg
144 utst_int.h: ${UBIK}/utst_int.xg
145 ${RXGEN} -A -h -u -o $@ ${UBIK}/utst_int.xg
147 utst_int.cs.c: utst_int.h
148 utst_int.ss.c: utst_int.h
149 utst_int.xdr.c: utst_int.h
151 utst_server.o: ${UBIK}/utst_server.c
152 ${AFS_CCRULE} ${UBIK}/utst_server.c
154 utst_client.o: ${UBIK}/utst_client.c
155 ${AFS_CCRULE} ${UBIK}/utst_client.c
157 udebug.o: ${UBIK}/udebug.c
158 ${AFS_CCRULE} ${UBIK}/udebug.c
160 uerrors.c ubik.h: ${UBIK}/uerrors.et ${UBIK}/ubik.p.h
161 $(RM) -f ubik.h uerrors.c
162 ${COMPILE_ET} -p ${UBIK} uerrors -h ubik
164 libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
166 $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
169 disk.o: ${UBIK}/disk.c
170 $(AFS_CCRULE) $(UBIK)/disk.c
172 uinit.o: ${UBIK}/uinit.c
173 $(AFS_CCRULE) $(UBIK)/uinit.c
175 remote.o: ${UBIK}/remote.c
176 $(AFS_CCRULE) $(UBIK)/remote.c
178 beacon.o: ${UBIK}/beacon.c
179 $(AFS_CCRULE) $(UBIK)/beacon.c
181 lock.o: ${UBIK}/lock.c
182 $(AFS_CCRULE) $(UBIK)/lock.c
184 recovery.o: ${UBIK}/recovery.c
185 $(AFS_CCRULE) $(UBIK)/recovery.c
187 ubik.o: ${UBIK}/ubik.c
188 $(AFS_CCRULE) $(UBIK)/ubik.c
190 phys.o: ${UBIK}/phys.c
191 $(AFS_CCRULE) $(UBIK)/phys.c
193 vote.o: ${UBIK}/vote.c
194 $(AFS_CCRULE) $(UBIK)/vote.c
196 ubikcmd.o: ${UBIK}/ubikcmd.c
197 $(AFS_CCRULE) $(UBIK)/ubikcmd.c
199 ubikclient.o: ${UBIK}/ubikclient.c
200 $(AFS_CCRULE) $(UBIK)/ubikclient.c
201 ubik_int.xdr.o: ubik_int.xdr.c
204 # Installation targets
208 install: libubik_pthread.a ubik.h ubik_int.h udebug
209 ${INSTALL} -d ${DESTDIR}${libdir}
210 ${INSTALL} -d ${DESTDIR}${includedir}
211 ${INSTALL} -d ${DESTDIR}${bindir}
212 ${INSTALL} -d ${DESTDIR}${afssrvbindir}
213 ${INSTALL_DATA} libubik_pthread.a ${DESTDIR}${libdir}/libubik_pthread.a
214 if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
215 $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${bindir}/udebug; \
216 $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${afssrvbindir}/udebug; \
217 ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h; \
218 ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h; \
221 dest: libubik_pthread.a ubik.h ubik_int.h udebug
222 ${INSTALL} -d ${DEST}/lib
223 ${INSTALL} -d ${DEST}/include
224 ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
225 ${INSTALL_DATA} libubik_pthread.a ${DEST}/lib/libubik_pthread.a
226 if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
227 ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug; \
228 ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug; \
229 ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h; \
230 ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h; \
237 $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
238 $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
240 include ../config/Makefile.version
242 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
245 ${TOP_INCDIR}/ubik.h: ubik.h
248 ${TOP_INCDIR}/ubik_int.h: ubik_int.h