54980dcc34a79022c76e969c8635d8852f6ff42b
[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
42 LT_deps = $(top_builddir)/src/opr/liboafs_opr.la \
43           $(top_builddir)/src/rx/liboafs_rx.la \
44           $(top_builddir)/src/ubik/liboafs_ubik.la
45
46 all: \
47         vlserver vlclient cnvldb vlserver cnvldb vldb_check \
48         Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \
49         liboafs_vldb.la libauthent_vlserver.la \
50         ${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 libauthent_vlserver.la: $(LT_objs)
136         $(LT_LDLIB_pic) $(LT_objs)
137
138 vlclient: vlclient.o libvldb.a $(LIBS)
139         $(AFS_LDRULE) vlclient.o libvldb.a \
140                 $(LIBS) ${TOP_LIBDIR}/libcmd.a $(LIB_roken) ${XLIBS}
141
142 vlclient.o: vlclient.c ${INCLS} AFS_component_version_number.o
143
144 vl_errors.o: vl_errors.c
145 vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
146         $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
147
148 vlserver.o: vlserver.c
149
150 system: install
151
152 install: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
153                 vldbint.h cnvldb.h
154         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
155         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
156         ${INSTALL} -d ${DESTDIR}${libdir}/afs
157         ${INSTALL} -d ${DESTDIR}${includedir}/afs
158         if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \
159                 ${INSTALL_PROGRAM} vlserver ${DESTDIR}${afssrvlibexecdir}/vlserver; \
160                 ${INSTALL_PROGRAM} cnvldb ${DESTDIR}${afssrvsbindir}/vldb_convert; \
161                 ${INSTALL_PROGRAM} vldb_check ${DESTDIR}${afssrvsbindir}/vldb_check; \
162         fi;
163         ${INSTALL_DATA} libvldb.a ${DESTDIR}${libdir}/afs/libvldb.a
164         ${INSTALL_DATA} ${srcdir}/vl_opcodes.h ${DESTDIR}${includedir}/afs/vl_opcodes.h
165         ${INSTALL_DATA} vlserver.h ${DESTDIR}${includedir}/afs/vlserver.h
166         ${INSTALL_DATA} vldbint.h ${DESTDIR}${includedir}/afs/vldbint.h
167         ${INSTALL_DATA} ${srcdir}/cnvldb.h ${DESTDIR}${includedir}/afs/cnvldb.h
168
169 dest: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
170                 vldbint.h cnvldb.h
171         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
172         ${INSTALL} -d ${DEST}/etc
173         ${INSTALL} -d ${DEST}/lib/afs
174         ${INSTALL} -d ${DEST}/include/afs
175         if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \
176                 ${INSTALL_PROGRAM} vlserver ${DEST}/root.server/usr/afs/bin/vlserver; \
177                 ${INSTALL_PROGRAM} cnvldb ${DEST}/etc/vldb_convert; \
178                 ${INSTALL_PROGRAM} vldb_check ${DEST}/etc/vldb_check; \
179         fi;
180         ${INSTALL_DATA} libvldb.a ${DEST}/lib/afs/libvldb.a
181         ${INSTALL_DATA} ${srcdir}/vl_opcodes.h ${DEST}/include/afs/vl_opcodes.h
182         ${INSTALL_DATA} vlserver.h ${DEST}/include/afs/vlserver.h
183         ${INSTALL_DATA} vldbint.h ${DEST}/include/afs/vldbint.h
184         ${INSTALL_DATA} ${srcdir}/cnvldb.h ${DEST}/include/afs/cnvldb.h
185
186 #
187 # Misc targets
188 #
189 include ../config/Makefile.version
190
191 clean:
192         $(LT_CLEAN)
193         $(RM) -f *.o *.a *.otl *.xdr.c *.cs.c *.ss.c core \
194                 vlserver vlclient cnvldb vldbint.h vlserver.h vldb_check \
195                 vl_errors.c AFS_component_version_number.c