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
8 srcdir=@srcdir@/../ubik
9 include @TOP_OBJDIR@/src/config/Makefile.config
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
14 HELPER_SPLINT=@HELPER_SPLINT@
16 CCRULE=${MT_CC} ${CFLAGS} ${MT_CFLAGS} -c $?
21 LIBOBJS=disk.o remote.o beacon.o recovery.o ubik.o vote.o lock.o phys.o \
22 ubik_int.cs.o ubik_int.ss.o ubik_int.xdr.o ubikcmd.o \
23 ubikclient.o uerrors.o uinit.o
25 INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
26 ${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
27 ${TOP_INCDIR}/lock.h ubik.h ubik_int.h utst_int.h
31 UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
32 volparse.o flipbase64.o softsig.o hostparse.o snprintf.o pthread_glock.o
34 LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/liblwp.a \
35 ${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/libcmd.a \
36 ${TOP_LIBDIR}/libsys.a ${XLIBS} \
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 rx_pthread.o: ${RX}/rx_pthread.c
54 # get the pthreaded util stuff compiled here. we do this instead of
55 # using the non-pthreaded libutil.a. There probably should be a
56 # pthreaded version of this library, as we are doing with ubik itself, but...
59 assert.o: ${UTIL}/assert.c
62 uuid.o: ${UTIL}/uuid.c
65 serverLog.o: ${UTIL}/serverLog.c
68 fileutil.o: ${UTIL}/fileutil.c
71 volparse.o: ${UTIL}/volparse.c
74 flipbase64.o: ${UTIL}/flipbase64.c
77 netutils.o: ${UTIL}/netutils.c
80 dirpath.o: ${UTIL}/dirpath.c
83 softsig.o: ${UTIL}/softsig.c
86 hostparse.o: ${UTIL}/hostparse.c
89 snprintf.o: ${UTIL}/snprintf.c
92 pthread_glock.o: ${UTIL}/pthread_glock.c
97 # insert comments here
100 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
101 ${CC} ${CFLAGS} -o utst_server utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a $(LIBS)
103 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
104 ${CC} ${CFLAGS} -o utst_client utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a $(LIBS)
106 udebug: udebug.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
107 ${CC} ${CFLAGS} -o udebug udebug.o libubik_pthread.a $(LIBS)
109 ubik_int.cs.c: ${srcdir}/ubik_int.xg
110 ${RXGEN} -x -C -o $@ ${srcdir}/ubik_int.xg
112 ubik_int.ss.c: ${srcdir}/ubik_int.xg
113 ${RXGEN} -x -S -o $@ ${srcdir}/ubik_int.xg
115 ubik_int.xdr.c: ${srcdir}/ubik_int.xg
116 ${RXGEN} -x -c -o $@ ${srcdir}/ubik_int.xg
118 ubik_int.h: ${srcdir}/ubik_int.xg
119 ${RXGEN} -x -h -o $@ ${srcdir}/ubik_int.xg
121 ubik_int.cs.c: ubik_int.h
122 ubik_int.ss.c: ubik_int.h
123 ubik_int.xdr.c: ubik_int.h
125 Kubik_int.cs.c: ${srcdir}/ubik_int.xg Kubik_int.h
126 ${RXGEN} -x -k -C -o Kubik_int.cs.c ${srcdir}/ubik_int.xg
128 Kubik_int.xdr.c: ${srcdir}/ubik_int.xg
129 ${RXGEN} -x -k -c -o Kubik_int.xdr.c ${srcdir}/ubik_int.xg
131 Kubik_int.h: ${srcdir}/ubik_int.xg
132 ${RXGEN} -x -k -h -o Kubik_int.h ${srcdir}/ubik_int.xg
134 #utst_int.ss.o: utst_int.ss.c utst_int.xdr.c
137 #utst_int.cs.o: utst_int.cs.c utst_int.xdr.c
140 #utst_int.xdr.o: utst_int.xdr.c utst_int.h
143 utst_int.cs.c: ${srcdir}/utst_int.xg
144 ${RXGEN} -C -o $@ ${srcdir}/utst_int.xg
146 utst_int.ss.c: ${srcdir}/utst_int.xg
147 ${RXGEN} -S -o $@ ${srcdir}/utst_int.xg
149 utst_int.xdr.c: ${srcdir}/utst_int.xg
150 ${RXGEN} -c -o $@ ${srcdir}/utst_int.xg
152 utst_int.h: ${srcdir}/utst_int.xg
153 ${RXGEN} -h -o $@ ${srcdir}/utst_int.xg
155 utst_int.cs.c: utst_int.h
156 utst_int.ss.c: utst_int.h
157 utst_int.xdr.c: utst_int.h
159 utst_server.o: ${srcdir}/utst_server.c
162 utst_client.o: ${srcdir}/utst_client.c
165 udebug.o: ${srcdir}/udebug.c
168 # ${CC} ${CFLAGS} -I. -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -c ${srcdir}/udebug.c
173 uerrors.c ubik.h: ${srcdir}/uerrors.et ${srcdir}/ubik.p.h
174 $(RM) -f ubik.h uerrors.c
175 ${COMPILE_ET} -p ${srcdir} uerrors -h ubik
177 libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
179 $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
182 disk.o: ${srcdir}/disk.c
185 uinit.o: ${srcdir}/uinit.c
188 remote.o: ${srcdir}/remote.c
191 beacon.o: ${srcdir}/beacon.c
194 lock.o: ${srcdir}/lock.c
197 recovery.o: ${srcdir}/recovery.c
200 ubik.o: ${srcdir}/ubik.c
203 phys.o: ${srcdir}/phys.c
206 vote.o: ${srcdir}/vote.c
209 ubikcmd.o: ${srcdir}/ubikcmd.c
212 ubikclient.o: ${srcdir}/ubikclient.c
215 ubik_int.ss.o: ubik_int.ss.c
218 ubik_int.cs.o: ubik_int.cs.c
221 ubik_int.xdr.o: ubik_int.xdr.c
224 utst_int.ss.o: utst_int.ss.c
227 utst_int.cs.o: utst_int.cs.c
230 utst_int.xdr.o: utst_int.xdr.c
234 # Installation targets
239 ${DESTDIR}${libdir}/libubik_pthread.a \
240 ${DESTDIR}${includedir}/ubik.h \
241 ${DESTDIR}${includedir}/ubik_int.h \
242 ${DESTDIR}${bindir}/udebug \
243 ${DESTDIR}${afssrvbindir}/udebug
245 ${DEST}/bin/udebug ${DEST}/root.server/usr/afs/bin/udebug: udebug
248 ${DEST}/lib/libubik_pthread.a: libubik_pthread.a
251 ${DEST}/include/ubik.h: ubik.h
254 ${DEST}/include/ubik_int.h: ubik_int.h
261 $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
262 $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
264 include ../config/Makefile.version
267 ${DESTDIR}${libdir}/libubik_pthread.a: libubik_pthread.a
270 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
273 ${DESTDIR}${includedir}/ubik.h: ubik.h
276 ${TOP_INCDIR}/ubik.h: ubik.h
279 ${DESTDIR}${includedir}/ubik_int.h: ubik_int.h
282 ${TOP_INCDIR}/ubik_int.h: ubik_int.h
285 ${DESTDIR}${bindir}/udebug: udebug
288 ${DESTDIR}${afssrvbindir}/udebug: udebug
292 ${DEST}/lib/libubik_pthread.a \
293 ${DEST}/include/ubik.h \
294 ${DEST}/include/ubik_int.h \
296 ${DEST}/root.server/usr/afs/bin/udebug