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