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@
14 UBIK=$(srcdir)/../ubik
16 UTIL=$(srcdir)/../util
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
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
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
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}
35 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
38 ubik_int.cs.c ubik_int.xdr.c \
39 ${TOP_INCDIR}/ubik.h \
40 ${TOP_INCDIR}/ubik_int.h
43 # get the pthreaded rx stuff compiled here
46 CFLAGS_rx_pthread.o = -DDPF_FSLOG
47 rx_pthread.o: ${RX}/rx_pthread.c
48 $(AFS_CCRULE) $(RX)/rx_pthread.c
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...
56 assert.o: ${UTIL}/assert.c
57 $(AFS_CCRULE) $(UTIL)/assert.c
59 uuid.o: ${UTIL}/uuid.c
60 $(AFS_CCRULE) $(UTIL)/uuid.c
62 serverLog.o: ${UTIL}/serverLog.c
63 $(AFS_CCRULE) $(UTIL)/serverLog.c
65 fileutil.o: ${UTIL}/fileutil.c
66 $(AFS_CCRULE) $(UTIL)/fileutil.c
68 volparse.o: ${UTIL}/volparse.c
69 $(AFS_CCRULE) $(UTIL)/volparse.c
71 flipbase64.o: ${UTIL}/flipbase64.c
72 $(AFS_CCRULE) $(UTIL)/flipbase64.c
74 netutils.o: ${UTIL}/netutils.c
75 $(AFS_CCRULE) $(UTIL)/netutils.c
77 dirpath.o: ${UTIL}/dirpath.c
78 $(AFS_CCRULE) $(UTIL)/dirpath.c
80 softsig.o: ${UTIL}/softsig.c
81 $(AFS_CCRULE) $(UTIL)/softsig.c
83 hostparse.o: ${UTIL}/hostparse.c
84 $(AFS_CCRULE) $(UTIL)/hostparse.c
86 pthread_glock.o: ${UTIL}/pthread_glock.c
87 $(AFS_CCRULE) $(UTIL)/pthread_glock.c
90 # insert comments here
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)
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)
101 udebug: udebug.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
102 $(AFS_LDRULE) udebug.o libubik_pthread.a \
103 $(LIBS) $(LIB_hcrypto) $(LIB_roken)
105 ubik_int.cs.c: ${UBIK}/ubik_int.xg
106 ${RXGEN} -A -x -C -o $@ ${UBIK}/ubik_int.xg
108 ubik_int.ss.c: ${UBIK}/ubik_int.xg
109 ${RXGEN} -A -x -S -o $@ ${UBIK}/ubik_int.xg
111 ubik_int.xdr.c: ${UBIK}/ubik_int.xg
112 ${RXGEN} -A -x -c -o $@ ${UBIK}/ubik_int.xg
114 ubik_int.h: ${UBIK}/ubik_int.xg
115 ${RXGEN} -A -x -h -o $@ ${UBIK}/ubik_int.xg
117 ubik_int.cs.c: ubik_int.h
118 ubik_int.ss.c: ubik_int.h
119 ubik_int.xdr.c: ubik_int.h
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
124 Kubik_int.xdr.c: ${UBIK}/ubik_int.xg
125 ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${UBIK}/ubik_int.xg
127 Kubik_int.h: ${UBIK}/ubik_int.xg
128 ${RXGEN} -A -x -k -h -o Kubik_int.h ${UBIK}/ubik_int.xg
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
134 utst_int.cs.c: ${UBIK}/utst_int.xg
135 ${RXGEN} -A -C -u -o $@ ${UBIK}/utst_int.xg
137 utst_int.ss.c: ${UBIK}/utst_int.xg
138 ${RXGEN} -A -S -o $@ ${UBIK}/utst_int.xg
140 utst_int.xdr.c: ${UBIK}/utst_int.xg
141 ${RXGEN} -A -c -o $@ ${UBIK}/utst_int.xg
143 utst_int.h: ${UBIK}/utst_int.xg
144 ${RXGEN} -A -h -u -o $@ ${UBIK}/utst_int.xg
146 utst_int.cs.c: utst_int.h
147 utst_int.ss.c: utst_int.h
148 utst_int.xdr.c: utst_int.h
150 utst_server.o: ${UBIK}/utst_server.c
151 ${AFS_CCRULE} ${UBIK}/utst_server.c
153 utst_client.o: ${UBIK}/utst_client.c
154 ${AFS_CCRULE} ${UBIK}/utst_client.c
156 udebug.o: ${UBIK}/udebug.c
157 ${AFS_CCRULE} ${UBIK}/udebug.c
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
163 libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
165 $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
168 disk.o: ${UBIK}/disk.c
169 $(AFS_CCRULE) $(UBIK)/disk.c
171 uinit.o: ${UBIK}/uinit.c
172 $(AFS_CCRULE) $(UBIK)/uinit.c
174 remote.o: ${UBIK}/remote.c
175 $(AFS_CCRULE) $(UBIK)/remote.c
177 beacon.o: ${UBIK}/beacon.c
178 $(AFS_CCRULE) $(UBIK)/beacon.c
180 lock.o: ${UBIK}/lock.c
181 $(AFS_CCRULE) $(UBIK)/lock.c
183 recovery.o: ${UBIK}/recovery.c
184 $(AFS_CCRULE) $(UBIK)/recovery.c
186 ubik.o: ${UBIK}/ubik.c
187 $(AFS_CCRULE) $(UBIK)/ubik.c
189 phys.o: ${UBIK}/phys.c
190 $(AFS_CCRULE) $(UBIK)/phys.c
192 vote.o: ${UBIK}/vote.c
193 $(AFS_CCRULE) $(UBIK)/vote.c
195 ubikcmd.o: ${UBIK}/ubikcmd.c
196 $(AFS_CCRULE) $(UBIK)/ubikcmd.c
198 ubikclient.o: ${UBIK}/ubikclient.c
199 $(AFS_CCRULE) $(UBIK)/ubikclient.c
200 ubik_int.xdr.o: ubik_int.xdr.c
203 # Installation targets
207 install: libubik_pthread.a ubik.h ubik_int.h udebug
208 ${INSTALL} -d ${DESTDIR}${libdir}
209 ${INSTALL} -d ${DESTDIR}${includedir}
210 ${INSTALL} -d ${DESTDIR}${bindir}
211 ${INSTALL} -d ${DESTDIR}${afssrvbindir}
212 ${INSTALL_PROGRAM} udebug ${DESTDIR}${bindir}/udebug
213 ${INSTALL_PROGRAM} udebug ${DESTDIR}${afssrvbindir}/udebug
214 ${INSTALL_DATA} libubik_pthread.a ${DESTDIR}${libdir}/libubik_pthread.a
215 ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h
216 ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h
218 dest: libubik_pthread.a ubik.h ubik_int.h udebug
219 ${INSTALL} -d ${DEST}/lib
220 ${INSTALL} -d ${DEST}/include
221 ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
222 ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug
223 ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug
224 ${INSTALL_DATA} libubik_pthread.a ${DEST}/lib/libubik_pthread.a
225 ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h
226 ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h
232 $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
233 $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
235 include ../config/Makefile.version
237 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
240 ${TOP_INCDIR}/ubik.h: ubik.h
243 ${TOP_INCDIR}/ubik_int.h: ubik_int.h