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 \
33 pthread_glock.o strlcat.o strlcpy.o strnlen.o
35 LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/liblwp.a \
36 ${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/libcmd.a \
37 ${TOP_LIBDIR}/libsys.a ${XLIBS} \
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 rx_pthread.o: ${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 assert.o: ${UTIL}/assert.c
63 uuid.o: ${UTIL}/uuid.c
66 serverLog.o: ${UTIL}/serverLog.c
69 fileutil.o: ${UTIL}/fileutil.c
72 volparse.o: ${UTIL}/volparse.c
75 strlcat.o: ${UTIL}/strlcat.c
78 strlcpy.o: ${UTIL}/strlcpy.c
81 strnlen.o: ${UTIL}/strnlen.c
84 flipbase64.o: ${UTIL}/flipbase64.c
87 netutils.o: ${UTIL}/netutils.c
90 dirpath.o: ${UTIL}/dirpath.c
93 softsig.o: ${UTIL}/softsig.c
96 hostparse.o: ${UTIL}/hostparse.c
99 snprintf.o: ${UTIL}/snprintf.c
102 pthread_glock.o: ${UTIL}/pthread_glock.c
107 # insert comments here
110 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
111 ${CC} ${CFLAGS} -o utst_server utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a $(LIBS)
113 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
114 ${CC} ${CFLAGS} -o utst_client utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a $(LIBS)
116 udebug: udebug.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
117 ${CC} ${CFLAGS} -o udebug udebug.o libubik_pthread.a $(LIBS)
119 ubik_int.cs.c: ${srcdir}/ubik_int.xg
120 ${RXGEN} -A -x -C -o $@ ${srcdir}/ubik_int.xg
122 ubik_int.ss.c: ${srcdir}/ubik_int.xg
123 ${RXGEN} -A -x -S -o $@ ${srcdir}/ubik_int.xg
125 ubik_int.xdr.c: ${srcdir}/ubik_int.xg
126 ${RXGEN} -A -x -c -o $@ ${srcdir}/ubik_int.xg
128 ubik_int.h: ${srcdir}/ubik_int.xg
129 ${RXGEN} -A -x -h -o $@ ${srcdir}/ubik_int.xg
131 ubik_int.cs.c: ubik_int.h
132 ubik_int.ss.c: ubik_int.h
133 ubik_int.xdr.c: ubik_int.h
135 Kubik_int.cs.c: ${srcdir}/ubik_int.xg Kubik_int.h
136 ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${srcdir}/ubik_int.xg
138 Kubik_int.xdr.c: ${srcdir}/ubik_int.xg
139 ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${srcdir}/ubik_int.xg
141 Kubik_int.h: ${srcdir}/ubik_int.xg
142 ${RXGEN} -A -x -k -h -o Kubik_int.h ${srcdir}/ubik_int.xg
144 utst_int.ss.o: utst_int.ss.c
147 utst_int.cs.o: utst_int.cs.c
150 utst_int.xdr.o: utst_int.xdr.c
153 utst_int.cs.c: ${srcdir}/utst_int.xg
154 ${RXGEN} -A -C -u -o $@ ${srcdir}/utst_int.xg
156 utst_int.ss.c: ${srcdir}/utst_int.xg
157 ${RXGEN} -A -S -o $@ ${srcdir}/utst_int.xg
159 utst_int.xdr.c: ${srcdir}/utst_int.xg
160 ${RXGEN} -A -c -o $@ ${srcdir}/utst_int.xg
162 utst_int.h: ${srcdir}/utst_int.xg
163 ${RXGEN} -A -h -u -o $@ ${srcdir}/utst_int.xg
165 utst_int.cs.c: utst_int.h
166 utst_int.ss.c: utst_int.h
167 utst_int.xdr.c: utst_int.h
169 utst_server.o: ${srcdir}/utst_server.c
172 utst_client.o: ${srcdir}/utst_client.c
175 udebug.o: ${srcdir}/udebug.c
178 # ${CC} ${CFLAGS} -I. -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -c ${srcdir}/udebug.c
183 uerrors.c ubik.h: ${srcdir}/uerrors.et ${srcdir}/ubik.p.h
184 $(RM) -f ubik.h uerrors.c
185 ${COMPILE_ET} -p ${srcdir} uerrors -h ubik
187 libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
189 $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
192 disk.o: ${srcdir}/disk.c
195 uinit.o: ${srcdir}/uinit.c
198 remote.o: ${srcdir}/remote.c
201 beacon.o: ${srcdir}/beacon.c
204 lock.o: ${srcdir}/lock.c
207 recovery.o: ${srcdir}/recovery.c
210 ubik.o: ${srcdir}/ubik.c
213 phys.o: ${srcdir}/phys.c
216 vote.o: ${srcdir}/vote.c
219 ubikcmd.o: ${srcdir}/ubikcmd.c
222 ubikclient.o: ${srcdir}/ubikclient.c
225 ubik_int.ss.o: ubik_int.ss.c
228 ubik_int.cs.o: ubik_int.cs.c
231 ubik_int.xdr.o: ubik_int.xdr.c
235 # Installation targets
240 ${DESTDIR}${libdir}/libubik_pthread.a \
241 ${DESTDIR}${bindir}/udebug \
242 ${DESTDIR}${afssrvbindir}/udebug
244 ${DEST}/bin/udebug ${DEST}/root.server/usr/afs/bin/udebug: udebug
247 ${DEST}/lib/libubik_pthread.a: libubik_pthread.a
250 ${DEST}/include/ubik.h: ubik.h
253 ${DEST}/include/ubik_int.h: ubik_int.h
260 $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
261 $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
263 include ../config/Makefile.version
266 ${DESTDIR}${libdir}/libubik_pthread.a: libubik_pthread.a
269 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
272 ${DESTDIR}${includedir}/ubik.h: ubik.h
275 ${TOP_INCDIR}/ubik.h: ubik.h
278 ${DESTDIR}${includedir}/ubik_int.h: ubik_int.h
281 ${TOP_INCDIR}/ubik_int.h: ubik_int.h
284 ${DESTDIR}${bindir}/udebug: udebug
287 ${DESTDIR}${afssrvbindir}/udebug: udebug
291 ${DEST}/lib/libubik_pthread.a \
293 ${DEST}/root.server/usr/afs/bin/udebug