ubik: Rename flags to dbFlags
[openafs.git] / src / ubik / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
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
7
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.lwp
11 include @TOP_OBJDIR@/src/config/Makefile.lwptool
12
13 LT_authent_objs = uinit.lo ubikclient.lo uerrors.lo ubik_int.cs.lo \
14                   ubik_int.xdr.lo
15
16 LT_objs =   $(LT_authent_objs) \
17             disk.lo remote.lo beacon.lo recovery.lo ubik.lo vote.lo lock.lo \
18             phys.lo ubik_int.ss.lo ubikcmd.lo
19
20 LT_deps =   $(top_builddir)/src/auth/liboafs_auth.la \
21             $(top_builddir)/src/opr/liboafs_opr.la \
22             $(top_builddir)/src/comerr/liboafs_comerr.la \
23             $(top_builddir)/src/lwp/liboafs_lwpcompat.la \
24             $(top_builddir)/src/rx/liboafs_rx.la \
25             $(top_builddir)/src/util/liboafs_util.la
26
27 INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
28         ${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
29         ${TOP_INCDIR}/lock.h ubik.h ubik_int.h
30
31 LIBS=${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/libafshcrypto_lwp.a \
32         ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libauth.a \
33         ${TOP_LIBDIR}/libafscom_err.a ${TOP_LIBDIR}/libcmd.a \
34         ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libauth.a \
35         ${TOP_LIBDIR}/libafsutil.a ${TOP_LIBDIR}/libopr.a \
36         ${XLIBS}
37
38 all: depinstall ${TOP_LIBDIR}/libubik.a udebug utst_server utst_client \
39      liboafs_ubik.la libauthent_ubik.la
40
41 generated: \
42         utst_int.cs.c utst_int.ss.c utst_int.xdr.c utst_int.h \
43         Kubik_int.cs.c Kubik_int.xdr.c Kubik_int.h \
44         ubik_int.cs.c ubik_int.ss.c ubik_int.xdr.c ubik_int.h \
45         uerrors.c ubik.h
46
47 depinstall: \
48         ubik_int.cs.c ubik_int.xdr.c \
49         ${TOP_INCDIR}/ubik.h \
50         ${TOP_INCDIR}/ubik_int.h
51
52 ${TOP_LIBDIR}/libubik.a: libubik.a
53         ${INSTALL_DATA} $? $@
54
55 ${TOP_INCDIR}/ubik.h: ubik.h
56         ${INSTALL_DATA} $? $@
57
58 ${TOP_INCDIR}/ubik_int.h: ubik_int.h
59         ${INSTALL_DATA} $? $@
60
61 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik.a
62         $(AFS_LDRULE) utst_server.o utst_int.ss.o utst_int.xdr.o \
63                 libubik.a $(LIBS) $(LIB_roken)
64
65 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik.a
66         $(AFS_LDRULE) utst_client.o utst_int.cs.o utst_int.xdr.o \
67                 libubik.a $(LIBS) $(LIB_roken)
68
69 udebug: udebug.o libubik.a
70         $(AFS_LDRULE) udebug.o libubik.a $(LIBS) $(LIB_roken)
71
72 ubik_int.cs.c: ubik_int.xg
73         ${RXGEN} -A -x -C -o $@ ${srcdir}/ubik_int.xg
74
75 ubik_int.ss.c: ubik_int.xg
76         ${RXGEN} -A -x -S -o $@ ${srcdir}/ubik_int.xg
77
78 ubik_int.xdr.c: ubik_int.xg
79         ${RXGEN} -A -x -c -o $@ ${srcdir}/ubik_int.xg
80
81 ubik_int.h: ubik_int.xg
82         ${RXGEN} -A -x -h -o $@ ${srcdir}/ubik_int.xg
83
84 ubik_int.cs.c: ubik_int.h
85 ubik_int.ss.c: ubik_int.h
86 ubik_int.xdr.c: ubik_int.h
87
88 Kubik_int.cs.c: ubik_int.xg Kubik_int.h
89         ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${srcdir}/ubik_int.xg
90
91 Kubik_int.xdr.c: ubik_int.xg
92         ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${srcdir}/ubik_int.xg
93
94 Kubik_int.h: ubik_int.xg
95         ${RXGEN} -A -x -k -h -o Kubik_int.h ${srcdir}/ubik_int.xg
96
97 utst_int.ss.o: utst_int.ss.c utst_int.xdr.c
98 utst_int.cs.o: utst_int.cs.c utst_int.xdr.c
99 utst_int.xdr.o: utst_int.xdr.c utst_int.h
100
101 utst_int.cs.c: utst_int.xg
102         ${RXGEN} -A -C -u -o $@ ${srcdir}/utst_int.xg
103
104 utst_int.ss.c: utst_int.xg
105         ${RXGEN} -A -S -o $@ ${srcdir}/utst_int.xg
106
107 utst_int.xdr.c: utst_int.xg
108         ${RXGEN} -A -c -o $@ ${srcdir}/utst_int.xg
109
110 utst_int.h: utst_int.xg
111         ${RXGEN} -A -h -u -o $@ ${srcdir}/utst_int.xg
112
113 utst_int.cs.c: utst_int.h
114 utst_int.ss.c: utst_int.h
115 utst_int.xdr.c: utst_int.h
116
117 utst_server.o: utst_server.c ${INCLS} utst_int.h AFS_component_version_number.c
118 utst_client.o: utst_client.c ${INCLS} utst_int.h AFS_component_version_number.c
119
120 udebug.o: udebug.c ${INCLS} AFS_component_version_number.c
121 uerrors.o: uerrors.c
122
123 uerrors.c: uerrors.et
124         ${COMPILE_ET_C} -p ${srcdir} uerrors
125
126 ubik.h: uerrors.et ubik.p.h
127         ${COMPILE_ET_H} -p ${srcdir} uerrors -h ubik
128
129 beacon.o beacon.lo: ubik.h
130 disk.o disk.lo: ubik.h
131 lock.o lock.lo: ubik.h
132 phys.o phys.lo: ubik.h
133 recovery.o recovery.lo: ubik.h
134 remote.o remote.lo: ubik.h
135 ubik.o ubik.lo: ubik.h
136 ubikclient.o ubikclient.lo: ubik.h
137 ubikcmd.o ubikcmd.lo: ubik.h
138 udebug.o udebug.lo: ubik.h
139 uinit.o uinit.lo: ubik.h
140 utst_client.o utst_client.lo: ubik.h
141 utst_server.o utst_server.lo: ubik.h
142 vote.o vote.lo: ubik.h
143
144 libubik.a: ${LT_objs}
145         $(LT_LDLIB_lwp) $(LT_objs)
146
147 $(LT_objs): $(INCLS)
148
149 utst_int.ss.o: utst_int.ss.c ${INCLS} utst_int.h
150 utst_int.cs.o: utst_int.cs.c ${INCLS} utst_int.h
151 utst_int.xdr.o: utst_int.xdr.c ${INCLS} utst_int.h
152
153 liboafs_ubik.la: liboafs_ubik.la.sym $(LT_objs) $(LT_deps)
154         $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
155
156 libauthent_ubik.la: $(LT_authent_objs)
157         $(LT_LDLIB_pic) $(LT_authent_objs)
158
159 #
160 # Installation targets
161 #
162 test: all
163
164 install: libubik.a ubik.h ubik_int.h udebug
165         ${INSTALL} -d ${DESTDIR}${libdir}
166         ${INSTALL} -d ${DESTDIR}${includedir}
167         ${INSTALL} -d ${DESTDIR}${bindir}
168         ${INSTALL} -d ${DESTDIR}${afssrvbindir}
169         ${INSTALL_DATA} libubik.a ${DESTDIR}${libdir}/libubik.a
170         ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h
171         ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h
172         ${INSTALL_PROGRAM} udebug ${DESTDIR}${bindir}/udebug
173         ${INSTALL_PROGRAM} udebug ${DESTDIR}${afssrvbindir}/udebug
174
175 dest: libubik.a ubik.h ubik_int.h udebug
176         ${INSTALL} -d ${DEST}/lib
177         ${INSTALL} -d ${DEST}/include
178         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
179         ${INSTALL_DATA} libubik.a ${DEST}/lib/libubik.a
180         ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h
181         ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h
182         ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug
183         ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug
184
185 #
186 # Misc. targets
187 #
188 clean:
189         $(LT_CLEAN)
190         $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
191         $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
192
193 include ../config/Makefile.version