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
17 LIBOBJS=disk.o remote.o beacon.o recovery.o ubik.o vote.o lock.o phys.o \
18 ubik_int.cs.o ubik_int.ss.o ubik_int.xdr.o ubikcmd.o \
19 ubikclient.o uerrors.o uinit.o
21 INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
22 ${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
23 ${TOP_INCDIR}/lock.h ubik.h ubik_int.h utst_int.h
26 LIBS=${TOP_LIBDIR}/libafsauthent.a \
27 $(top_builddir)/src/lwp/liboafs_lwpcompat.la \
28 $(top_builddir)/src/comerr/liboafs_comerr.la \
29 ${top_builddir}/src/cmd/liboafs_cmd.la \
30 $(top_builddir)/src/sys/liboafs_sys.la \
31 $(top_builddir)/src/util/liboafs_util.la \
32 $(top_builddir)/src/opr/liboafs_opr.la \
35 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
38 ubik_int.cs.c ubik_int.xdr.c \
39 ${TOP_INCDIR}/ubik.h \
40 ${TOP_INCDIR}/ubik_int.h
43 # insert comments here
46 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a
47 $(LT_LDRULE_static) utst_server.o utst_int.ss.o utst_int.xdr.o \
48 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
50 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a
51 $(LT_LDRULE_static) utst_client.o utst_int.cs.o utst_int.xdr.o \
52 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
54 udebug: udebug.o libubik_pthread.a
55 $(LT_LDRULE_static) udebug.o libubik_pthread.a \
56 $(LIBS) $(LIB_hcrypto) $(LIB_roken)
58 ubik_int.cs.c: ${UBIK}/ubik_int.xg
59 ${RXGEN} -A -x -C -o $@ ${UBIK}/ubik_int.xg
61 ubik_int.ss.c: ${UBIK}/ubik_int.xg
62 ${RXGEN} -A -x -S -o $@ ${UBIK}/ubik_int.xg
64 ubik_int.xdr.c: ${UBIK}/ubik_int.xg
65 ${RXGEN} -A -x -c -o $@ ${UBIK}/ubik_int.xg
67 ubik_int.h: ${UBIK}/ubik_int.xg
68 ${RXGEN} -A -x -h -o $@ ${UBIK}/ubik_int.xg
70 ubik_int.cs.c: ubik_int.h
71 ubik_int.ss.c: ubik_int.h
72 ubik_int.xdr.c: ubik_int.h
74 Kubik_int.cs.c: ${UBIK}/ubik_int.xg Kubik_int.h
75 ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${UBIK}/ubik_int.xg
77 Kubik_int.xdr.c: ${UBIK}/ubik_int.xg
78 ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${UBIK}/ubik_int.xg
80 Kubik_int.h: ${UBIK}/ubik_int.xg
81 ${RXGEN} -A -x -k -h -o Kubik_int.h ${UBIK}/ubik_int.xg
83 utst_int.ss.o: utst_int.ss.c
84 utst_int.cs.o: utst_int.cs.c
85 utst_int.xdr.o: utst_int.xdr.c
87 utst_int.cs.c: ${UBIK}/utst_int.xg
88 ${RXGEN} -A -C -u -o $@ ${UBIK}/utst_int.xg
90 utst_int.ss.c: ${UBIK}/utst_int.xg
91 ${RXGEN} -A -S -o $@ ${UBIK}/utst_int.xg
93 utst_int.xdr.c: ${UBIK}/utst_int.xg
94 ${RXGEN} -A -c -o $@ ${UBIK}/utst_int.xg
96 utst_int.h: ${UBIK}/utst_int.xg
97 ${RXGEN} -A -h -u -o $@ ${UBIK}/utst_int.xg
99 utst_int.cs.c: utst_int.h
100 utst_int.ss.c: utst_int.h
101 utst_int.xdr.c: utst_int.h
103 utst_server.o: ${UBIK}/utst_server.c
104 ${AFS_CCRULE} ${UBIK}/utst_server.c
106 utst_client.o: ${UBIK}/utst_client.c
107 ${AFS_CCRULE} ${UBIK}/utst_client.c
109 udebug.o: ${UBIK}/udebug.c
110 ${AFS_CCRULE} ${UBIK}/udebug.c
112 uerrors.c ubik.h: ${UBIK}/uerrors.et ${UBIK}/ubik.p.h
113 $(RM) -f ubik.h uerrors.c
114 ${COMPILE_ET} -p ${UBIK} uerrors -h ubik
116 libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
118 $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
121 disk.o: ${UBIK}/disk.c
122 $(AFS_CCRULE) $(UBIK)/disk.c
124 uinit.o: ${UBIK}/uinit.c
125 $(AFS_CCRULE) $(UBIK)/uinit.c
127 remote.o: ${UBIK}/remote.c
128 $(AFS_CCRULE) $(UBIK)/remote.c
130 beacon.o: ${UBIK}/beacon.c
131 $(AFS_CCRULE) $(UBIK)/beacon.c
133 lock.o: ${UBIK}/lock.c
134 $(AFS_CCRULE) $(UBIK)/lock.c
136 recovery.o: ${UBIK}/recovery.c
137 $(AFS_CCRULE) $(UBIK)/recovery.c
139 ubik.o: ${UBIK}/ubik.c
140 $(AFS_CCRULE) $(UBIK)/ubik.c
142 phys.o: ${UBIK}/phys.c
143 $(AFS_CCRULE) $(UBIK)/phys.c
145 vote.o: ${UBIK}/vote.c
146 $(AFS_CCRULE) $(UBIK)/vote.c
148 ubikcmd.o: ${UBIK}/ubikcmd.c
149 $(AFS_CCRULE) $(UBIK)/ubikcmd.c
151 ubikclient.o: ${UBIK}/ubikclient.c
152 $(AFS_CCRULE) $(UBIK)/ubikclient.c
153 ubik_int.xdr.o: ubik_int.xdr.c
156 # Installation targets
160 install: libubik_pthread.a ubik.h ubik_int.h udebug
161 ${INSTALL} -d ${DESTDIR}${libdir}
162 ${INSTALL} -d ${DESTDIR}${includedir}
163 ${INSTALL} -d ${DESTDIR}${bindir}
164 ${INSTALL} -d ${DESTDIR}${afssrvbindir}
165 ${INSTALL_DATA} libubik_pthread.a ${DESTDIR}${libdir}/libubik_pthread.a
166 if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
167 $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${bindir}/udebug; \
168 $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${afssrvbindir}/udebug; \
169 ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h; \
170 ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h; \
173 dest: libubik_pthread.a ubik.h ubik_int.h udebug
174 ${INSTALL} -d ${DEST}/lib
175 ${INSTALL} -d ${DEST}/include
176 ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
177 ${INSTALL_DATA} libubik_pthread.a ${DEST}/lib/libubik_pthread.a
178 if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
179 ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug; \
180 ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug; \
181 ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h; \
182 ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h; \
189 $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
190 $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
192 include ../config/Makefile.version
194 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
197 ${TOP_INCDIR}/ubik.h: ubik.h
200 ${TOP_INCDIR}/ubik_int.h: ubik_int.h