generated file target
[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 INSTALL = @INSTALL@
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
14 ENABLE_PTHREADED_UBIK = @ENABLE_PTHREADED_UBIK@
15
16 INCLS=${TOP_INCDIR}/ubik.h \
17              ${TOP_INCDIR}/lwp.h \
18              ${TOP_INCDIR}/lock.h  \
19              ${TOP_INCDIR}/rx/rx.h \
20              ${TOP_INCDIR}/rx/xdr.h \
21              ${TOP_INCDIR}/afs/keys.h \
22              ${TOP_INCDIR}/afs/cellconfig.h \
23         vlserver.h vldbint.h
24
25 LIBS=\
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}/libdes.a \
33         ${TOP_LIBDIR}/libcom_err.a \
34         ${TOP_LIBDIR}/libcmd.a \
35         ${TOP_LIBDIR}/libsys.a \
36         ${TOP_LIBDIR}/libafsutil.a
37
38 OBJS=vldbint.xdr.o vldbint.cs.o vl_errors.o
39
40
41 all: \
42         vlserver vlclient cnvldb vlserver cnvldb vldb_check \
43         Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \
44         ${TOP_LIBDIR}/libvldb.a depinstall
45
46 generated: \
47         vl_errors.c vlserver.h \
48         Kvldbint.cs.c Kvldbint.xdr.c \
49         vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h
50
51 depinstall: \
52         Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \
53         ${TOP_INCDIR}/afs/vl_opcodes.h \
54         ${TOP_INCDIR}/afs/vlserver.h \
55         ${TOP_INCDIR}/afs/vldbint.h \
56         ${TOP_INCDIR}/afs/cnvldb.h 
57
58 ${TOP_LIBDIR}/libvldb.a: libvldb.a
59         ${INSTALL_DATA} $? $@
60
61 ${TOP_INCDIR}/afs/vl_opcodes.h: vl_opcodes.h
62         ${INSTALL_DATA} $? $@
63
64 ${TOP_INCDIR}/afs/vlserver.h: vlserver.h
65         ${INSTALL_DATA} $? $@
66
67 ${TOP_INCDIR}/afs/vldbint.h: vldbint.h
68         ${INSTALL_DATA} $? $@
69
70 ${TOP_INCDIR}/afs/cnvldb.h: cnvldb.h
71         ${INSTALL_DATA} $? $@
72
73 vldb_check: vldb_check.o ${LIBS}
74         $(CC) ${CFLAGS} -o vldb_check vldb_check.o ${LIBS} ${XLIBS} 
75
76 vldb_check.o: vldb_check.c AFS_component_version_number.o
77
78 cnvldb: cnvldb.o ${LIBS}
79         $(CC) ${CFLAGS} -o cnvldb cnvldb.o ${LIBS} ${XLIBS}
80
81 cnvldb.o: cnvldb.c cnvldb.h AFS_component_version_number.o
82
83 sascnvldb: sascnvldb.o ${LIBS}
84         $(CC) ${CFLAGS} -o sascnvldb sascnvldb.o ${LIBS} ${XLIBS}
85
86 sascnvldb.o: sascnvldb.c cnvldb.h AFS_component_version_number.o
87
88 vlserver: vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.o $(LIBS)
89         $(CC) ${CFLAGS} -o vlserver vlserver.o vlutils.o vlprocs.o vldbint.ss.o \
90                 vldbint.xdr.o $(LIBS) ${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         $(CC) ${CFLAGS} -o vlclient vlclient.o libvldb.a $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libcmd.a
128
129 vlclient.o: vlclient.c ${INCLS} AFS_component_version_number.o
130
131 vl_errors.o: vl_errors.c
132 vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
133         $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
134
135 vlserver.o: vlserver.c
136
137 system: install
138
139 install: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
140                 vldbint.h cnvldb.h
141         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
142         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
143         ${INSTALL} -d ${DESTDIR}${libdir}/afs
144         ${INSTALL} -d ${DESTDIR}${includedir}/afs
145         if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \
146                 ${INSTALL_PROGRAM} vlserver ${DESTDIR}${afssrvlibexecdir}/vlserver; \
147                 ${INSTALL_PROGRAM} cnvldb ${DESTDIR}${afssrvsbindir}/vldb_convert; \
148                 ${INSTALL_PROGRAM} vldb_check ${DESTDIR}${afssrvsbindir}/vldb_check; \
149         fi;
150         ${INSTALL_DATA} libvldb.a ${DESTDIR}${libdir}/afs/libvldb.a
151         ${INSTALL_DATA} vl_opcodes.h ${DESTDIR}${includedir}/afs/vl_opcodes.h
152         ${INSTALL_DATA} vlserver.h ${DESTDIR}${includedir}/afs/vlserver.h
153         ${INSTALL_DATA} vldbint.h ${DESTDIR}${includedir}/afs/vldbint.h
154         ${INSTALL_DATA} cnvldb.h ${DESTDIR}${includedir}/afs/cnvldb.h
155
156 dest: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
157                 vldbint.h cnvldb.h
158         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
159         ${INSTALL} -d ${DEST}/etc
160         ${INSTALL} -d ${DEST}/lib/afs
161         ${INSTALL} -d ${DEST}/include/afs
162         if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \
163                 ${INSTALL_PROGRAM} vlserver ${DEST}/root.server/usr/afs/bin/vlserver; \
164                 ${INSTALL_PROGRAM} cnvldb ${DEST}/etc/vldb_convert; \
165                 ${INSTALL_PROGRAM} vldb_check ${DEST}/etc/vldb_check; \
166         fi;
167         ${INSTALL_DATA} libvldb.a ${DEST}/lib/afs/libvldb.a
168         ${INSTALL_DATA} vl_opcodes.h ${DEST}/include/afs/vl_opcodes.h
169         ${INSTALL_DATA} vlserver.h ${DEST}/include/afs/vlserver.h
170         ${INSTALL_DATA} vldbint.h ${DEST}/include/afs/vldbint.h
171         ${INSTALL_DATA} cnvldb.h ${DEST}/include/afs/cnvldb.h
172
173 #
174 # Misc targets
175 #
176 include ../config/Makefile.version
177
178 clean:
179         $(RM) -f *.o *.a *.otl *.xdr.c *.cs.c *.ss.c core \
180                 vlserver vlclient cnvldb vldbint.h vlserver.h vldb_check \
181                 vl_errors.c AFS_component_version_number.c