build: compile_et rules for parallel make
[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 include @TOP_OBJDIR@/src/config/Makefile.lwptool
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}/libafsrfc3961.a \
39         ${TOP_LIBDIR}/libafshcrypto_lwp.a
40
41 LT_objs = vldbint.xdr.lo vldbint.cs.lo vl_errors.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 libauthent_vlserver.la \
51         ${TOP_LIBDIR}/libvldb.a depinstall
52
53 generated: \
54         vl_errors.c vlserver.h \
55         Kvldbint.cs.c Kvldbint.xdr.c \
56         vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h
57
58 depinstall: \
59         Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \
60         ${TOP_INCDIR}/afs/vl_opcodes.h \
61         ${TOP_INCDIR}/afs/vlserver.h \
62         ${TOP_INCDIR}/afs/vldbint.h \
63         ${TOP_INCDIR}/afs/cnvldb.h 
64
65 ${TOP_LIBDIR}/libvldb.a: libvldb.a
66         ${INSTALL_DATA} $? $@
67
68 ${TOP_INCDIR}/afs/vl_opcodes.h: vl_opcodes.h
69         ${INSTALL_DATA} $? $@
70
71 ${TOP_INCDIR}/afs/vlserver.h: vlserver.h
72         ${INSTALL_DATA} $? $@
73
74 ${TOP_INCDIR}/afs/vldbint.h: vldbint.h
75         ${INSTALL_DATA} $? $@
76
77 ${TOP_INCDIR}/afs/cnvldb.h: cnvldb.h
78         ${INSTALL_DATA} $? $@
79
80 vldb_check: vldb_check.o ${LIBS}
81         $(AFS_LDRULE) vldb_check.o ${LIBS} $(LIB_roken) ${XLIBS}
82
83 vldb_check.o: vldb_check.c AFS_component_version_number.o
84
85 cnvldb: cnvldb.o ${LIBS}
86         $(AFS_LDRULE) cnvldb.o ${LIBS} $(LIB_roken) ${XLIBS}
87
88 cnvldb.o: cnvldb.c cnvldb.h AFS_component_version_number.o
89
90 sascnvldb: sascnvldb.o ${LIBS}
91         $(AFS_LDRULE) sascnvldb.o ${LIBS} $(LIB_roken) ${XLIBS}
92
93 sascnvldb.o: sascnvldb.c cnvldb.h AFS_component_version_number.o
94
95 vlserver: vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.lo $(LIBS)
96         $(AFS_LDRULE) vlserver.o vlutils.o vlprocs.o vldbint.ss.o \
97                 .lwp/vldbint.xdr.o \
98                 $(LIBS) $(LIB_roken) ${XLIBS}
99
100 vlserver.o: vlserver.c ${INCLS} AFS_component_version_number.o
101 vlutils.o: vlutils.c ${INCLS}
102 vlprocs.o: vlprocs.c ${INCLS}
103 vldbint.ss.o: vldbint.ss.c vldbint.xdr.c
104
105 vldbint.cs.lo: vldbint.cs.c vldbint.xdr.c
106 vldbint.xdr.lo: vldbint.xdr.c vldbint.h
107
108 vldbint.cs.c: vldbint.xg
109         ${RXGEN} -A -u -x -C -o $@ ${srcdir}/vldbint.xg
110
111 vldbint.ss.c: vldbint.xg
112         ${RXGEN} -A -x -S -o $@ ${srcdir}/vldbint.xg
113
114 vldbint.xdr.c: vldbint.xg
115         ${RXGEN} -A -x -c -o $@ ${srcdir}/vldbint.xg
116
117 vldbint.h: vldbint.xg
118         ${RXGEN} -A -u -x -h -o $@ ${srcdir}/vldbint.xg
119
120 vldbint.cs.c: vldbint.h
121 vldbint.ss.c: vldbint.h
122 vldbint.xdr.c: vldbint.h
123
124 Kvldbint.cs.c: vldbint.xg
125         ${RXGEN} -A -x -k -C -o $@ ${srcdir}/vldbint.xg
126
127 Kvldbint.xdr.c: vldbint.xg
128         ${RXGEN} -A -x -k -c -o $@ ${srcdir}/vldbint.xg
129
130 libvldb.a: $(LT_objs)
131         $(LT_LDLIB_lwp) $(LT_objs)
132
133 liboafs_vldb.la: liboafs_vldb.la.sym $(LT_objs) $(LT_deps)
134         $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
135
136 libauthent_vlserver.la: $(LT_objs)
137         $(LT_LDLIB_pic) $(LT_objs)
138
139 vlclient: vlclient.o libvldb.a $(LIBS)
140         $(AFS_LDRULE) vlclient.o libvldb.a \
141                 $(LIBS) ${TOP_LIBDIR}/libcmd.a $(LIB_roken) ${XLIBS}
142
143 vlclient.o: vlclient.c ${INCLS} AFS_component_version_number.o
144
145 vl_errors.o: vl_errors.c
146
147 vl_errors.c vlserver.h : vl_errors.et vlserver.p.h
148         $(RM) -f vlserver.h vl_errors.c
149         ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
150 vlserver.h: vl_errors.c
151
152 vlserver.o: vlserver.c
153
154 system: install
155
156 install: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
157                 vldbint.h cnvldb.h
158         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
159         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
160         ${INSTALL} -d ${DESTDIR}${libdir}/afs
161         ${INSTALL} -d ${DESTDIR}${includedir}/afs
162         if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \
163                 ${INSTALL_PROGRAM} vlserver ${DESTDIR}${afssrvlibexecdir}/vlserver; \
164                 ${INSTALL_PROGRAM} cnvldb ${DESTDIR}${afssrvsbindir}/vldb_convert; \
165                 ${INSTALL_PROGRAM} vldb_check ${DESTDIR}${afssrvsbindir}/vldb_check; \
166         fi;
167         ${INSTALL_DATA} libvldb.a ${DESTDIR}${libdir}/afs/libvldb.a
168         ${INSTALL_DATA} ${srcdir}/vl_opcodes.h ${DESTDIR}${includedir}/afs/vl_opcodes.h
169         ${INSTALL_DATA} vlserver.h ${DESTDIR}${includedir}/afs/vlserver.h
170         ${INSTALL_DATA} vldbint.h ${DESTDIR}${includedir}/afs/vldbint.h
171         ${INSTALL_DATA} ${srcdir}/cnvldb.h ${DESTDIR}${includedir}/afs/cnvldb.h
172
173 dest: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
174                 vldbint.h cnvldb.h
175         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
176         ${INSTALL} -d ${DEST}/etc
177         ${INSTALL} -d ${DEST}/lib/afs
178         ${INSTALL} -d ${DEST}/include/afs
179         if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \
180                 ${INSTALL_PROGRAM} vlserver ${DEST}/root.server/usr/afs/bin/vlserver; \
181                 ${INSTALL_PROGRAM} cnvldb ${DEST}/etc/vldb_convert; \
182                 ${INSTALL_PROGRAM} vldb_check ${DEST}/etc/vldb_check; \
183         fi;
184         ${INSTALL_DATA} libvldb.a ${DEST}/lib/afs/libvldb.a
185         ${INSTALL_DATA} ${srcdir}/vl_opcodes.h ${DEST}/include/afs/vl_opcodes.h
186         ${INSTALL_DATA} vlserver.h ${DEST}/include/afs/vlserver.h
187         ${INSTALL_DATA} vldbint.h ${DEST}/include/afs/vldbint.h
188         ${INSTALL_DATA} ${srcdir}/cnvldb.h ${DEST}/include/afs/cnvldb.h
189
190 #
191 # Misc targets
192 #
193 include ../config/Makefile.version
194
195 clean:
196         $(LT_CLEAN)
197         $(RM) -f *.o *.a *.otl *.xdr.c *.cs.c *.ss.c core \
198                 vlserver vlclient cnvldb vldbint.h vlserver.h vldb_check \
199                 vl_errors.c AFS_component_version_number.c