vlserver: Use libtool
[openafs.git] / src / vlserver / 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.libtool
11 include @TOP_OBJDIR@/src/config/Makefile.lwp
12
13 ENABLE_PTHREADED_UBIK = @ENABLE_PTHREADED_UBIK@
14
15 INCLS=${TOP_INCDIR}/ubik.h \
16              ${TOP_INCDIR}/lwp.h \
17              ${TOP_INCDIR}/lock.h  \
18              ${TOP_INCDIR}/rx/rx.h \
19              ${TOP_INCDIR}/rx/xdr.h \
20              ${TOP_INCDIR}/afs/keys.h \
21              ${TOP_INCDIR}/afs/cellconfig.h \
22         vlserver.h vldbint.h
23
24 LIBS=\
25         $(TOP_LIBDIR)/libopr.a \
26         ${TOP_LIBDIR}/libubik.a \
27         ${TOP_LIBDIR}/libauth.a \
28         ${TOP_LIBDIR}/librxkad.a \
29         ${TOP_LIBDIR}/librxstat.a \
30         ${TOP_LIBDIR}/librx.a \
31         ${TOP_LIBDIR}/liblwp.a \
32         ${TOP_LIBDIR}/libafscom_err.a \
33         ${TOP_LIBDIR}/libcmd.a \
34         ${TOP_LIBDIR}/libsys.a \
35         ${TOP_LIBDIR}/libaudit.a \
36         ${TOP_LIBDIR}/libafsutil.a \
37         $(TOP_LIBDIR)/libopr.a \
38         ${TOP_LIBDIR}/libafshcrypto_lwp.a
39
40 LT_objs = vldbint.xdr.lo vldbint.cs.lo vl_errors.lo \
41           AFS_component_version_number.lo
42
43 LT_deps = $(top_builddir)/src/opr/liboafs_opr.la \
44           $(top_builddir)/src/rx/liboafs_rx.la \
45           $(top_builddir)/src/ubik/liboafs_ubik.la
46
47 all: \
48         vlserver vlclient cnvldb vlserver cnvldb vldb_check \
49         Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \
50         liboafs_vldb.la ${TOP_LIBDIR}/libvldb.a depinstall
51
52 generated: \
53         vl_errors.c vlserver.h \
54         Kvldbint.cs.c Kvldbint.xdr.c \
55         vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h
56
57 depinstall: \
58         Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \
59         ${TOP_INCDIR}/afs/vl_opcodes.h \
60         ${TOP_INCDIR}/afs/vlserver.h \
61         ${TOP_INCDIR}/afs/vldbint.h \
62         ${TOP_INCDIR}/afs/cnvldb.h 
63
64 ${TOP_LIBDIR}/libvldb.a: libvldb.a
65         ${INSTALL_DATA} $? $@
66
67 ${TOP_INCDIR}/afs/vl_opcodes.h: vl_opcodes.h
68         ${INSTALL_DATA} $? $@
69
70 ${TOP_INCDIR}/afs/vlserver.h: vlserver.h
71         ${INSTALL_DATA} $? $@
72
73 ${TOP_INCDIR}/afs/vldbint.h: vldbint.h
74         ${INSTALL_DATA} $? $@
75
76 ${TOP_INCDIR}/afs/cnvldb.h: cnvldb.h
77         ${INSTALL_DATA} $? $@
78
79 vldb_check: vldb_check.o ${LIBS}
80         $(AFS_LDRULE) vldb_check.o ${LIBS} $(LIB_roken) ${XLIBS}
81
82 vldb_check.o: vldb_check.c AFS_component_version_number.o
83
84 cnvldb: cnvldb.o ${LIBS}
85         $(AFS_LDRULE) cnvldb.o ${LIBS} $(LIB_roken) ${XLIBS}
86
87 cnvldb.o: cnvldb.c cnvldb.h AFS_component_version_number.o
88
89 sascnvldb: sascnvldb.o ${LIBS}
90         $(AFS_LDRULE) sascnvldb.o ${LIBS} $(LIB_roken) ${XLIBS}
91
92 sascnvldb.o: sascnvldb.c cnvldb.h AFS_component_version_number.o
93
94 vlserver: vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.lo $(LIBS)
95         $(AFS_LDRULE) vlserver.o vlutils.o vlprocs.o vldbint.ss.o \
96                 .lwp/vldbint.xdr.o \
97                 $(LIBS) $(LIB_roken) ${XLIBS}
98
99 vlserver.o: vlserver.c ${INCLS} AFS_component_version_number.o
100 vlutils.o: vlutils.c ${INCLS}
101 vlprocs.o: vlprocs.c ${INCLS}
102 vldbint.ss.o: vldbint.ss.c vldbint.xdr.c
103
104 vldbint.cs.lo: vldbint.cs.c vldbint.xdr.c
105 vldbint.xdr.lo: vldbint.xdr.c vldbint.h
106
107 vldbint.cs.c: vldbint.xg
108         ${RXGEN} -A -u -x -C -o $@ ${srcdir}/vldbint.xg
109
110 vldbint.ss.c: vldbint.xg
111         ${RXGEN} -A -x -S -o $@ ${srcdir}/vldbint.xg
112
113 vldbint.xdr.c: vldbint.xg
114         ${RXGEN} -A -x -c -o $@ ${srcdir}/vldbint.xg
115
116 vldbint.h: vldbint.xg
117         ${RXGEN} -A -u -x -h -o $@ ${srcdir}/vldbint.xg
118
119 vldbint.cs.c: vldbint.h
120 vldbint.ss.c: vldbint.h
121 vldbint.xdr.c: vldbint.h
122
123 Kvldbint.cs.c: vldbint.xg
124         ${RXGEN} -A -x -k -C -o $@ ${srcdir}/vldbint.xg
125
126 Kvldbint.xdr.c: vldbint.xg
127         ${RXGEN} -A -x -k -c -o $@ ${srcdir}/vldbint.xg
128
129 libvldb.a: $(LT_objs)
130         $(LT_LDLIB_lwp) $(LT_objs)
131
132 liboafs_vldb.la: liboafs_vldb.la.sym $(LT_objs) $(LT_deps)
133         $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
134
135 vlclient: vlclient.o libvldb.a $(LIBS)
136         $(AFS_LDRULE) vlclient.o libvldb.a \
137                 $(LIBS) ${TOP_LIBDIR}/libcmd.a $(LIB_roken) ${XLIBS}
138
139 vlclient.o: vlclient.c ${INCLS} AFS_component_version_number.o
140
141 vl_errors.o: vl_errors.c
142 vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
143         $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
144
145 vlserver.o: vlserver.c
146
147 system: install
148
149 install: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
150                 vldbint.h cnvldb.h
151         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
152         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
153         ${INSTALL} -d ${DESTDIR}${libdir}/afs
154         ${INSTALL} -d ${DESTDIR}${includedir}/afs
155         if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \
156                 ${INSTALL_PROGRAM} vlserver ${DESTDIR}${afssrvlibexecdir}/vlserver; \
157                 ${INSTALL_PROGRAM} cnvldb ${DESTDIR}${afssrvsbindir}/vldb_convert; \
158                 ${INSTALL_PROGRAM} vldb_check ${DESTDIR}${afssrvsbindir}/vldb_check; \
159         fi;
160         ${INSTALL_DATA} libvldb.a ${DESTDIR}${libdir}/afs/libvldb.a
161         ${INSTALL_DATA} ${srcdir}/vl_opcodes.h ${DESTDIR}${includedir}/afs/vl_opcodes.h
162         ${INSTALL_DATA} vlserver.h ${DESTDIR}${includedir}/afs/vlserver.h
163         ${INSTALL_DATA} vldbint.h ${DESTDIR}${includedir}/afs/vldbint.h
164         ${INSTALL_DATA} ${srcdir}/cnvldb.h ${DESTDIR}${includedir}/afs/cnvldb.h
165
166 dest: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
167                 vldbint.h cnvldb.h
168         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
169         ${INSTALL} -d ${DEST}/etc
170         ${INSTALL} -d ${DEST}/lib/afs
171         ${INSTALL} -d ${DEST}/include/afs
172         if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \
173                 ${INSTALL_PROGRAM} vlserver ${DEST}/root.server/usr/afs/bin/vlserver; \
174                 ${INSTALL_PROGRAM} cnvldb ${DEST}/etc/vldb_convert; \
175                 ${INSTALL_PROGRAM} vldb_check ${DEST}/etc/vldb_check; \
176         fi;
177         ${INSTALL_DATA} libvldb.a ${DEST}/lib/afs/libvldb.a
178         ${INSTALL_DATA} ${srcdir}/vl_opcodes.h ${DEST}/include/afs/vl_opcodes.h
179         ${INSTALL_DATA} vlserver.h ${DEST}/include/afs/vlserver.h
180         ${INSTALL_DATA} vldbint.h ${DEST}/include/afs/vldbint.h
181         ${INSTALL_DATA} ${srcdir}/cnvldb.h ${DEST}/include/afs/cnvldb.h
182
183 #
184 # Misc targets
185 #
186 include ../config/Makefile.version
187
188 clean:
189         $(LT_CLEAN)
190         $(RM) -f *.o *.a *.otl *.xdr.c *.cs.c *.ss.c core \
191                 vlserver vlclient cnvldb vldbint.h vlserver.h vldb_check \
192                 vl_errors.c AFS_component_version_number.c