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@
13 ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
15 UBIK=$(srcdir)/../ubik
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 LIBS=${RXOBJS} ${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a \
29 $(top_builddir)/src/comerr/liboafs_comerr.la \
30 ${top_builddir}/src/cmd/liboafs_cmd.la \
31 ${TOP_LIBDIR}/libsys.a \
32 $(top_builddir)/src/util/liboafs_util.la \
33 $(top_builddir)/src/opr/liboafs_opr.la \
36 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
39 ubik_int.cs.c ubik_int.xdr.c \
40 ${TOP_INCDIR}/ubik.h \
41 ${TOP_INCDIR}/ubik_int.h
44 # get the pthreaded rx stuff compiled here
47 CFLAGS_rx_pthread.o = -DDPF_FSLOG
48 rx_pthread.o: ${RX}/rx_pthread.c
49 $(AFS_CCRULE) $(RX)/rx_pthread.c
53 # insert comments here
56 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a ${RXOBJS}
57 $(LT_LDRULE_static) utst_server.o utst_int.ss.o utst_int.xdr.o \
58 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
60 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a ${RXOBJS}
61 $(LT_LDRULE_static) utst_client.o utst_int.cs.o utst_int.xdr.o \
62 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
64 udebug: udebug.o libubik_pthread.a ${RXOBJS}
65 $(LT_LDRULE_static) udebug.o libubik_pthread.a \
66 $(LIBS) $(LIB_hcrypto) $(LIB_roken)
68 ubik_int.cs.c: ${UBIK}/ubik_int.xg
69 ${RXGEN} -A -x -C -o $@ ${UBIK}/ubik_int.xg
71 ubik_int.ss.c: ${UBIK}/ubik_int.xg
72 ${RXGEN} -A -x -S -o $@ ${UBIK}/ubik_int.xg
74 ubik_int.xdr.c: ${UBIK}/ubik_int.xg
75 ${RXGEN} -A -x -c -o $@ ${UBIK}/ubik_int.xg
77 ubik_int.h: ${UBIK}/ubik_int.xg
78 ${RXGEN} -A -x -h -o $@ ${UBIK}/ubik_int.xg
80 ubik_int.cs.c: ubik_int.h
81 ubik_int.ss.c: ubik_int.h
82 ubik_int.xdr.c: ubik_int.h
84 Kubik_int.cs.c: ${UBIK}/ubik_int.xg Kubik_int.h
85 ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${UBIK}/ubik_int.xg
87 Kubik_int.xdr.c: ${UBIK}/ubik_int.xg
88 ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${UBIK}/ubik_int.xg
90 Kubik_int.h: ${UBIK}/ubik_int.xg
91 ${RXGEN} -A -x -k -h -o Kubik_int.h ${UBIK}/ubik_int.xg
93 utst_int.ss.o: utst_int.ss.c
94 utst_int.cs.o: utst_int.cs.c
95 utst_int.xdr.o: utst_int.xdr.c
97 utst_int.cs.c: ${UBIK}/utst_int.xg
98 ${RXGEN} -A -C -u -o $@ ${UBIK}/utst_int.xg
100 utst_int.ss.c: ${UBIK}/utst_int.xg
101 ${RXGEN} -A -S -o $@ ${UBIK}/utst_int.xg
103 utst_int.xdr.c: ${UBIK}/utst_int.xg
104 ${RXGEN} -A -c -o $@ ${UBIK}/utst_int.xg
106 utst_int.h: ${UBIK}/utst_int.xg
107 ${RXGEN} -A -h -u -o $@ ${UBIK}/utst_int.xg
109 utst_int.cs.c: utst_int.h
110 utst_int.ss.c: utst_int.h
111 utst_int.xdr.c: utst_int.h
113 utst_server.o: ${UBIK}/utst_server.c
114 ${AFS_CCRULE} ${UBIK}/utst_server.c
116 utst_client.o: ${UBIK}/utst_client.c
117 ${AFS_CCRULE} ${UBIK}/utst_client.c
119 udebug.o: ${UBIK}/udebug.c
120 ${AFS_CCRULE} ${UBIK}/udebug.c
122 uerrors.c ubik.h: ${UBIK}/uerrors.et ${UBIK}/ubik.p.h
123 $(RM) -f ubik.h uerrors.c
124 ${COMPILE_ET} -p ${UBIK} uerrors -h ubik
126 libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
128 $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
131 disk.o: ${UBIK}/disk.c
132 $(AFS_CCRULE) $(UBIK)/disk.c
134 uinit.o: ${UBIK}/uinit.c
135 $(AFS_CCRULE) $(UBIK)/uinit.c
137 remote.o: ${UBIK}/remote.c
138 $(AFS_CCRULE) $(UBIK)/remote.c
140 beacon.o: ${UBIK}/beacon.c
141 $(AFS_CCRULE) $(UBIK)/beacon.c
143 lock.o: ${UBIK}/lock.c
144 $(AFS_CCRULE) $(UBIK)/lock.c
146 recovery.o: ${UBIK}/recovery.c
147 $(AFS_CCRULE) $(UBIK)/recovery.c
149 ubik.o: ${UBIK}/ubik.c
150 $(AFS_CCRULE) $(UBIK)/ubik.c
152 phys.o: ${UBIK}/phys.c
153 $(AFS_CCRULE) $(UBIK)/phys.c
155 vote.o: ${UBIK}/vote.c
156 $(AFS_CCRULE) $(UBIK)/vote.c
158 ubikcmd.o: ${UBIK}/ubikcmd.c
159 $(AFS_CCRULE) $(UBIK)/ubikcmd.c
161 ubikclient.o: ${UBIK}/ubikclient.c
162 $(AFS_CCRULE) $(UBIK)/ubikclient.c
163 ubik_int.xdr.o: ubik_int.xdr.c
166 # Installation targets
170 install: libubik_pthread.a ubik.h ubik_int.h udebug
171 ${INSTALL} -d ${DESTDIR}${libdir}
172 ${INSTALL} -d ${DESTDIR}${includedir}
173 ${INSTALL} -d ${DESTDIR}${bindir}
174 ${INSTALL} -d ${DESTDIR}${afssrvbindir}
175 ${INSTALL_DATA} libubik_pthread.a ${DESTDIR}${libdir}/libubik_pthread.a
176 if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
177 $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${bindir}/udebug; \
178 $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${afssrvbindir}/udebug; \
179 ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h; \
180 ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h; \
183 dest: libubik_pthread.a ubik.h ubik_int.h udebug
184 ${INSTALL} -d ${DEST}/lib
185 ${INSTALL} -d ${DEST}/include
186 ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
187 ${INSTALL_DATA} libubik_pthread.a ${DEST}/lib/libubik_pthread.a
188 if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
189 ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug; \
190 ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug; \
191 ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h; \
192 ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h; \
199 $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
200 $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
202 include ../config/Makefile.version
204 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
207 ${TOP_INCDIR}/ubik.h: ubik.h
210 ${TOP_INCDIR}/ubik_int.h: ubik_int.h