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 CCRULE=${MT_CC} ${CFLAGS} ${MT_CFLAGS} -c $?
16 LIBOBJS=disk.o remote.o beacon.o recovery.o ubik.o vote.o lock.o phys.o \
17 ubik_int.cs.o ubik_int.ss.o ubik_int.xdr.o ubikcmd.o \
18 ubikclient.o uerrors.o uinit.o
20 INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
21 ${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
22 ${TOP_INCDIR}/lock.h ubik.h ubik_int.h utst_int.h
26 UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
27 volparse.o flipbase64.o softsig.o hostparse.o snprintf.o pthread_glock.o
29 LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/liblwp.a \
30 ${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/libcmd.a \
31 ${TOP_LIBDIR}/libsys.a ${XLIBS} \
34 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
37 ubik_int.cs.c ubik_int.xdr.c \
38 ${TOP_INCDIR}/ubik.h \
39 ${TOP_INCDIR}/ubik_int.h
42 # get the pthreaded rx stuff compiled here
45 rx_pthread.o: ${RX}/rx_pthread.c
49 # get the pthreaded util stuff compiled here. we do this instead of
50 # using the non-pthreaded libutil.a. There probably should be a
51 # pthreaded version of this library, as we are doing with ubik itself, but...
54 assert.o: ${UTIL}/assert.c
57 uuid.o: ${UTIL}/uuid.c
60 serverLog.o: ${UTIL}/serverLog.c
63 fileutil.o: ${UTIL}/fileutil.c
66 volparse.o: ${UTIL}/volparse.c
69 flipbase64.o: ${UTIL}/flipbase64.c
72 netutils.o: ${UTIL}/netutils.c
75 dirpath.o: ${UTIL}/dirpath.c
78 softsig.o: ${UTIL}/softsig.c
81 hostparse.o: ${UTIL}/hostparse.c
84 snprintf.o: ${UTIL}/snprintf.c
87 pthread_glock.o: ${UTIL}/pthread_glock.c
92 # insert comments here
95 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
96 ${CC} ${CFLAGS} -o utst_server utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a $(LIBS)
98 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
99 ${CC} ${CFLAGS} -o utst_client utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a $(LIBS)
101 udebug: udebug.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
102 ${CC} ${CFLAGS} -o udebug udebug.o libubik_pthread.a $(LIBS)
104 ubik_int.cs.c: ${srcdir}/ubik_int.xg
105 ${RXGEN} -x -C -o $@ ${srcdir}/ubik_int.xg
107 ubik_int.ss.c: ${srcdir}/ubik_int.xg
108 ${RXGEN} -x -S -o $@ ${srcdir}/ubik_int.xg
110 ubik_int.xdr.c: ${srcdir}/ubik_int.xg
111 ${RXGEN} -x -c -o $@ ${srcdir}/ubik_int.xg
113 ubik_int.h: ${srcdir}/ubik_int.xg
114 ${RXGEN} -x -h -o $@ ${srcdir}/ubik_int.xg
116 ubik_int.cs.c: ubik_int.h
117 ubik_int.ss.c: ubik_int.h
118 ubik_int.xdr.c: ubik_int.h
120 Kubik_int.cs.c: ${srcdir}/ubik_int.xg Kubik_int.h
121 ${RXGEN} -x -k -C -o Kubik_int.cs.c ${srcdir}/ubik_int.xg
123 Kubik_int.xdr.c: ${srcdir}/ubik_int.xg
124 ${RXGEN} -x -k -c -o Kubik_int.xdr.c ${srcdir}/ubik_int.xg
126 Kubik_int.h: ${srcdir}/ubik_int.xg
127 ${RXGEN} -x -k -h -o Kubik_int.h ${srcdir}/ubik_int.xg
129 #utst_int.ss.o: utst_int.ss.c utst_int.xdr.c
132 #utst_int.cs.o: utst_int.cs.c utst_int.xdr.c
135 #utst_int.xdr.o: utst_int.xdr.c utst_int.h
138 utst_int.cs.c: ${srcdir}/utst_int.xg
139 ${RXGEN} -C -o $@ ${srcdir}/utst_int.xg
141 utst_int.ss.c: ${srcdir}/utst_int.xg
142 ${RXGEN} -S -o $@ ${srcdir}/utst_int.xg
144 utst_int.xdr.c: ${srcdir}/utst_int.xg
145 ${RXGEN} -c -o $@ ${srcdir}/utst_int.xg
147 utst_int.h: ${srcdir}/utst_int.xg
148 ${RXGEN} -h -o $@ ${srcdir}/utst_int.xg
150 utst_int.cs.c: utst_int.h
151 utst_int.ss.c: utst_int.h
152 utst_int.xdr.c: utst_int.h
154 utst_server.o: ${srcdir}/utst_server.c ${INCLS}
157 utst_client.o: ${srcdir}/utst_client.c ${INCLS}
160 udebug.o: ${srcdir}/udebug.c ${INCLS} AFS_component_version_number.c
163 # ${CC} ${CFLAGS} -I. -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -c ${srcdir}/udebug.c
168 uerrors.c ubik.h: ${srcdir}/uerrors.et ${srcdir}/ubik.p.h
169 $(RM) -f ubik.h uerrors.c
170 ${COMPILE_ET} -p ${srcdir} uerrors -h ubik
172 libubik_pthread.a: ${LIBOBJS} AFS_component_version_number.o
174 $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
177 disk.o: ${srcdir}/disk.c ${INCLS}
180 uinit.o: ${srcdir}/uinit.c ${INCLS}
183 remote.o: ${srcdir}/remote.c ${INCLS}
186 beacon.o: ${srcdir}/beacon.c ${INCLS}
189 lock.o: ${srcdir}/lock.c ${INCLS}
192 recovery.o: ${srcdir}/recovery.c ${INCLS}
195 ubik.o: ${srcdir}/ubik.c ${INCLS}
198 phys.o: ${srcdir}/phys.c ${INCLS}
201 vote.o: ${srcdir}/vote.c ${INCLS}
204 ubikcmd.o: ${srcdir}/ubikcmd.c ${INCLS}
207 ubikclient.o: ${srcdir}/ubikclient.c ${INCLS}
210 ubik_int.ss.o: ubik_int.ss.c ${INCLS}
213 ubik_int.cs.o: ubik_int.cs.c ${INCLS}
216 ubik_int.xdr.o: ubik_int.xdr.c ${INCLS}
219 utst_int.ss.o: utst_int.ss.c ${INCLS} utst_int.h
222 utst_int.cs.o: utst_int.cs.c ${INCLS} utst_int.h
225 utst_int.xdr.o: utst_int.xdr.c ${INCLS} utst_int.h
229 # Installation targets
234 ${DESTDIR}${libdir}/libubik_pthread.a \
235 ${DESTDIR}${includedir}/ubik.h \
236 ${DESTDIR}${includedir}/ubik_int.h \
237 ${DESTDIR}${bindir}/udebug \
238 ${DESTDIR}${afssrvbindir}/udebug
240 ${DEST}/bin/udebug ${DEST}/root.server/usr/afs/bin/udebug: udebug
243 ${DEST}/lib/libubik_pthread.a: libubik_pthread.a
246 ${DEST}/include/ubik.h: ubik.h
249 ${DEST}/include/ubik_int.h: ubik_int.h
256 $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
257 $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
259 include ../config/Makefile.version
262 ${DESTDIR}${libdir}/libubik_pthread.a: libubik_pthread.a
265 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
268 ${DESTDIR}${includedir}/ubik.h: ubik.h
271 ${TOP_INCDIR}/ubik.h: ubik.h
274 ${DESTDIR}${includedir}/ubik_int.h: ubik_int.h
277 ${TOP_INCDIR}/ubik_int.h: ubik_int.h
280 ${DESTDIR}${bindir}/udebug: udebug
283 ${DESTDIR}${afssrvbindir}/udebug: udebug
287 ${DEST}/lib/libubik_pthread.a \
288 ${DEST}/include/ubik.h \
289 ${DEST}/include/ubik_int.h \
291 ${DEST}/root.server/usr/afs/bin/udebug