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
13 INSTALL_DATA = @INSTALL_DATA@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@
15 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16 HELPER_SPLINT=@HELPER_SPLINT@
18 UBIK=$(srcdir)/../ubik
20 UTIL=$(srcdir)/../util
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
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
32 UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
33 volparse.o flipbase64.o softsig.o hostparse.o snprintf.o \
36 LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/liblwp.a \
37 ${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/libcmd.a \
38 ${TOP_LIBDIR}/libsys.a ${XLIBS} ${MT_LIBS}
40 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
43 ubik_int.cs.c ubik_int.xdr.c \
44 ${TOP_INCDIR}/ubik.h \
45 ${TOP_INCDIR}/ubik_int.h
48 # get the pthreaded rx stuff compiled here
51 CFLAGS_rx_pthread.o = -DDPF_FSLOG
52 rx_pthread.o: ${RX}/rx_pthread.c
53 $(AFS_CCRULE) $(RX)/rx_pthread.c
56 # get the pthreaded util stuff compiled here. we do this instead of
57 # using the non-pthreaded libutil.a. There probably should be a
58 # pthreaded version of this library, as we are doing with ubik itself, but...
61 assert.o: ${UTIL}/assert.c
62 $(AFS_CCRULE) $(UTIL)/assert.c
64 uuid.o: ${UTIL}/uuid.c
65 $(AFS_CCRULE) $(UTIL)/uuid.c
67 serverLog.o: ${UTIL}/serverLog.c
68 $(AFS_CCRULE) $(UTIL)/serverLog.c
70 fileutil.o: ${UTIL}/fileutil.c
71 $(AFS_CCRULE) $(UTIL)/fileutil.c
73 volparse.o: ${UTIL}/volparse.c
74 $(AFS_CCRULE) $(UTIL)/volparse.c
76 flipbase64.o: ${UTIL}/flipbase64.c
77 $(AFS_CCRULE) $(UTIL)/flipbase64.c
79 netutils.o: ${UTIL}/netutils.c
80 $(AFS_CCRULE) $(UTIL)/netutils.c
82 dirpath.o: ${UTIL}/dirpath.c
83 $(AFS_CCRULE) $(UTIL)/dirpath.c
85 softsig.o: ${UTIL}/softsig.c
86 $(AFS_CCRULE) $(UTIL)/softsig.c
88 hostparse.o: ${UTIL}/hostparse.c
89 $(AFS_CCRULE) $(UTIL)/hostparse.c
91 snprintf.o: ${UTIL}/snprintf.c
92 $(AFS_CCRULE) $(UTIL)/snprintf.c
94 pthread_glock.o: ${UTIL}/pthread_glock.c
95 $(AFS_CCRULE) $(UTIL)/pthread_glock.c
98 # insert comments here
101 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
102 $(AFS_LDRULE) utst_server.o utst_int.ss.o utst_int.xdr.o \
103 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
105 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
106 $(AFS_LDRULE) utst_client.o utst_int.cs.o utst_int.xdr.o \
107 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
109 udebug: udebug.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
110 $(AFS_LDRULE) udebug.o libubik_pthread.a \
111 $(LIBS) $(LIB_hcrypto) $(LIB_roken)
113 ubik_int.cs.c: ${UBIK}/ubik_int.xg
114 ${RXGEN} -A -x -C -o $@ ${UBIK}/ubik_int.xg
116 ubik_int.ss.c: ${UBIK}/ubik_int.xg
117 ${RXGEN} -A -x -S -o $@ ${UBIK}/ubik_int.xg
119 ubik_int.xdr.c: ${UBIK}/ubik_int.xg
120 ${RXGEN} -A -x -c -o $@ ${UBIK}/ubik_int.xg
122 ubik_int.h: ${UBIK}/ubik_int.xg
123 ${RXGEN} -A -x -h -o $@ ${UBIK}/ubik_int.xg
125 ubik_int.cs.c: ubik_int.h
126 ubik_int.ss.c: ubik_int.h
127 ubik_int.xdr.c: ubik_int.h
129 Kubik_int.cs.c: ${UBIK}/ubik_int.xg Kubik_int.h
130 ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${UBIK}/ubik_int.xg
132 Kubik_int.xdr.c: ${UBIK}/ubik_int.xg
133 ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${UBIK}/ubik_int.xg
135 Kubik_int.h: ${UBIK}/ubik_int.xg
136 ${RXGEN} -A -x -k -h -o Kubik_int.h ${UBIK}/ubik_int.xg
138 utst_int.ss.o: utst_int.ss.c
139 utst_int.cs.o: utst_int.cs.c
140 utst_int.xdr.o: utst_int.xdr.c
142 utst_int.cs.c: ${UBIK}/utst_int.xg
143 ${RXGEN} -A -C -u -o $@ ${UBIK}/utst_int.xg
145 utst_int.ss.c: ${UBIK}/utst_int.xg
146 ${RXGEN} -A -S -o $@ ${UBIK}/utst_int.xg
148 utst_int.xdr.c: ${UBIK}/utst_int.xg
149 ${RXGEN} -A -c -o $@ ${UBIK}/utst_int.xg
151 utst_int.h: ${UBIK}/utst_int.xg
152 ${RXGEN} -A -h -u -o $@ ${UBIK}/utst_int.xg
154 utst_int.cs.c: utst_int.h
155 utst_int.ss.c: utst_int.h
156 utst_int.xdr.c: utst_int.h
158 utst_server.o: ${UBIK}/utst_server.c
159 ${AFS_CCRULE} ${UBIK}/utst_server.c
161 utst_client.o: ${UBIK}/utst_client.c
162 ${AFS_CCRULE} ${UBIK}/utst_client.c
164 udebug.o: ${UBIK}/udebug.c
165 ${AFS_CCRULE} ${UBIK}/udebug.c
167 uerrors.c ubik.h: ${UBIK}/uerrors.et ${UBIK}/ubik.p.h
168 $(RM) -f ubik.h uerrors.c
169 ${COMPILE_ET} -p ${UBIK} uerrors -h ubik
171 libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
173 $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
176 disk.o: ${UBIK}/disk.c
177 $(AFS_CCRULE) $(UBIK)/disk.c
179 uinit.o: ${UBIK}/uinit.c
180 $(AFS_CCRULE) $(UBIK)/uinit.c
182 remote.o: ${UBIK}/remote.c
183 $(AFS_CCRULE) $(UBIK)/remote.c
185 beacon.o: ${UBIK}/beacon.c
186 $(AFS_CCRULE) $(UBIK)/beacon.c
188 lock.o: ${UBIK}/lock.c
189 $(AFS_CCRULE) $(UBIK)/lock.c
191 recovery.o: ${UBIK}/recovery.c
192 $(AFS_CCRULE) $(UBIK)/recovery.c
194 ubik.o: ${UBIK}/ubik.c
195 $(AFS_CCRULE) $(UBIK)/ubik.c
197 phys.o: ${UBIK}/phys.c
198 $(AFS_CCRULE) $(UBIK)/phys.c
200 vote.o: ${UBIK}/vote.c
201 $(AFS_CCRULE) $(UBIK)/vote.c
203 ubikcmd.o: ${UBIK}/ubikcmd.c
204 $(AFS_CCRULE) $(UBIK)/ubikcmd.c
206 ubikclient.o: ${UBIK}/ubikclient.c
207 $(AFS_CCRULE) $(UBIK)/ubikclient.c
208 ubik_int.xdr.o: ubik_int.xdr.c
211 # Installation targets
215 install: ${DESTDIR}${libdir}/libubik_pthread.a udebug
216 ${INSTALL} udebug ${DESTDIR}${bindir}/udebug
217 ${INSTALL} udebug ${DESTDIR}${afssrvbindir}/udebug
219 ${DEST}/bin/udebug ${DEST}/root.server/usr/afs/bin/udebug: udebug
222 ${DEST}/lib/libubik_pthread.a: libubik_pthread.a
225 ${DEST}/include/ubik.h: ubik.h
228 ${DEST}/include/ubik_int.h: ubik_int.h
235 $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
236 $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
238 include ../config/Makefile.version
241 ${DESTDIR}${libdir}/libubik_pthread.a: libubik_pthread.a
244 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
247 ${DESTDIR}${includedir}/ubik.h: ubik.h
250 ${TOP_INCDIR}/ubik.h: ubik.h
253 ${DESTDIR}${includedir}/ubik_int.h: ubik_int.h
256 ${TOP_INCDIR}/ubik_int.h: ubik_int.h
260 ${DEST}/lib/libubik_pthread.a \
262 ${DEST}/root.server/usr/afs/bin/udebug