makefiles-attempt-to-support-gmake-j-20011023
[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 DEST=@DEST@
9 TOP_INCDIR=@TOP_INCDIR@
10 TOP_LIBDIR=@TOP_LIBDIR@
11 TOP_OBJDIR=@TOP_OBJDIR@
12 srcdir=@srcdir@
13 VPATH=${srcdir}
14 prefix=@prefix@
15 exec_prefix=@exec_prefix@
16 bindir=@bindir@
17 sbindir=@sbindir@
18 libexecdir=@libexecdir@
19 libdir=@libdir@
20 includedir=@includedir@
21 mandir=@mandir@
22 afssrvbindir=@afssrvbindir@
23 afssrvsbindir=@afssrvsbindir@
24 afssrvlibexecdir=@afssrvlibexecdir@
25 TOP_SRCDIR=@TOP_SRCDIR@
26 SYS_NAME=@AFS_SYSNAME@
27
28 SHELL = /bin/sh
29
30 include ../config/Makefile.${SYS_NAME}
31
32 KERNELDIR=../libafs/
33 UKERNELDIR=../libuafs/
34 COMPILE_ET=${TOP_OBJDIR}/src/comerr/compile_et
35
36 CFLAGS=-I. -I${srcdir} ${DBUG} -I.. -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
37 INCLS=${TOP_INCDIR}/ubik.h \
38              ${TOP_INCDIR}/lwp.h \
39              ${TOP_INCDIR}/lock.h  \
40              ${TOP_INCDIR}/rx/rx.h \
41              ${TOP_INCDIR}/rx/xdr.h \
42              ${TOP_INCDIR}/afs/keys.h \
43              ${TOP_INCDIR}/afs/cellconfig.h \
44         vlserver.h vlclient.h vldbint.h
45
46 LIBS=\
47         ${TOP_LIBDIR}/libubik.a \
48         ${TOP_LIBDIR}/libauth.a \
49         ${TOP_LIBDIR}/librxkad.a \
50         ${TOP_LIBDIR}/librxstat.a \
51         ${TOP_LIBDIR}/librx.a \
52         ${TOP_LIBDIR}/liblwp.a \
53         ${TOP_LIBDIR}/libdes.a \
54         ${TOP_LIBDIR}/libcom_err.a \
55         ${TOP_LIBDIR}/util.a \
56         ${TOP_LIBDIR}/libsys.a \
57         ${TOP_LIBDIR}/util.a
58
59
60 RXGEN=${TOP_OBJDIR}/src/rxgen/rxgen
61 KSRCS=Kvldbint.cs.c Kvldbint.xdr.c vl_opcodes.h vldbint.h
62 UKSRCS=$(KSRCS)
63
64 OBJS=vldbint.xdr.o vldbint.cs.o vl_errors.o
65
66 CDIR=../../../src/vlserver
67
68
69 all: \
70         vlserver vlclient cnvldb vlserver cnvldb vldb_check \
71         ${TOP_LIBDIR}/libvldb.a \
72         ${TOP_INCDIR}/afs/vl_opcodes.h \
73         ${TOP_INCDIR}/afs/vlserver.h \
74         ${TOP_INCDIR}/afs/vldbint.h \
75         ${TOP_INCDIR}/afs/cnvldb.h \
76         ${KERNELDIR}/afsint/Kvldbint.cs.c \
77         ${KERNELDIR}/afsint/Kvldbint.xdr.c \
78         ${KERNELDIR}/afsint/vl_opcodes.h \
79         ${KERNELDIR}/afsint/vldbint.h \
80         ${UKERNELDIR}/afsint/Kvldbint.cs.c \
81         ${UKERNELDIR}/afsint/Kvldbint.xdr.c \
82         ${UKERNELDIR}/afsint/vl_opcodes.h \
83         ${UKERNELDIR}/afsint/vldbint.h
84
85
86 vldb_check: vldb_check.o
87         $(CC) ${CFLAGS} -o vldb_check vldb_check.o ${XLIBS} \
88                 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a
89
90 vldb_check.o: vldb_check.c AFS_component_version_number.o
91
92 cnvldb: cnvldb.o 
93         $(CC) ${CFLAGS} -o cnvldb cnvldb.o ${XLIBS} ${TOP_LIBDIR}/libcmd.a\
94                  ${TOP_LIBDIR}/util.a            
95
96 cnvldb.o: cnvldb.c cnvldb.h AFS_component_version_number.o
97
98 sascnvldb: sascnvldb.o 
99         $(CC) ${CFLAGS} -o sascnvldb sascnvldb.o ${XLIBS}
100
101 sascnvldb.o: sascnvldb.c cnvldb.h AFS_component_version_number.o
102
103 vlserver: vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.o $(LIBS)
104         $(CC) ${CFLAGS} -o vlserver vlserver.o vlutils.o vlprocs.o vldbint.ss.o \
105                 vldbint.xdr.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libaudit.a
106
107 vlserver.o: vlserver.c ${INCLS} AFS_component_version_number.o
108 vlutils.o: vlutils.c ${INCLS}
109 vlprocs.o: vlprocs.c ${INCLS}
110 vldbint.ss.o: vldbint.ss.c vldbint.xdr.c
111 vldbint.cs.o: vldbint.cs.c vldbint.xdr.c
112 vldbint.xdr.o: vldbint.xdr.c vldbint.h
113
114 vldbint.cs.c: vldbint.xg
115         ${RXGEN} -x -C -o $@ ${srcdir}/vldbint.xg
116
117 vldbint.ss.c: vldbint.xg
118         ${RXGEN} -x -S -o $@ ${srcdir}/vldbint.xg
119
120 vldbint.xdr.c: vldbint.xg
121         ${RXGEN} -x -c -o $@ ${srcdir}/vldbint.xg
122
123 vldbint.h: vldbint.xg
124         ${RXGEN} -x -h -o $@ ${srcdir}/vldbint.xg
125
126 vldbint.cs.c: vldbint.h
127 vldbint.ss.c: vldbint.h
128 vldbint.xdr.c: vldbint.h
129
130 Kvldbint.cs.c: vldbint.xg
131         ${RXGEN} -x -k -C -o $@ ${srcdir}/vldbint.xg
132
133 Kvldbint.xdr.c: vldbint.xg
134         ${RXGEN} -x -k -c -o $@ ${srcdir}/vldbint.xg
135
136 libvldb.a: $(OBJS) AFS_component_version_number.o
137         $(RM) -f $@
138         $(AR) crv $@ $(OBJS) AFS_component_version_number.o
139         $(RANLIB) $@
140
141 vlclient: vlclient.o libvldb.a $(LIBS)
142         $(CC) ${CFLAGS} -o vlclient vlclient.o libvldb.a $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libcmd.a
143
144 vlclient.o: vlclient.c ${INCLS} AFS_component_version_number.o
145
146 vl_errors.o: vl_errors.c
147 vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
148         $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
149
150 system: install
151
152 kinstall: $(KSRCS)
153         ${INSTALL} $(KSRCS) ${KERNELDIR}/afsint
154
155 ukinstall webinstall: ${UKERNELDIR}/afsint $(UKSRCS)
156         ${INSTALL} $(UKSRCS) ${UKERNELDIR}/afsint
157
158 ${UKERNELDIR}/afsint:
159         mkdir -p $@
160
161 ${DEST}/root.server/usr/afs/bin/vlserver: vlserver
162         ${INSTALL} $? $@
163
164 ${DEST}/etc/vldb_convert: cnvldb
165         ${INSTALL} -f $? $@
166
167 ${TOP_LIBDIR}/libvldb.a: libvldb.a
168         ${INSTALL} $? $@
169
170 ${TOP_INCDIR}/afs/vl_opcodes.h: vl_opcodes.h
171         ${INSTALL} $? $@
172
173 ${TOP_INCDIR}/afs/vlserver.h: vlserver.h
174         ${INSTALL} $? $@
175
176 ${TOP_INCDIR}/afs/vldbint.h: vldbint.h
177         ${INSTALL} $? $@
178
179 ${TOP_INCDIR}/afs/cnvldb.h: cnvldb.h
180         ${INSTALL} $? $@
181
182 ${KERNELDIR}/afsint/Kvldbint.cs.c: Kvldbint.cs.c
183         ${INSTALL} $? $@
184
185 ${KERNELDIR}/afsint/Kvldbint.xdr.c: Kvldbint.xdr.c
186         ${INSTALL} $? $@
187
188 ${KERNELDIR}/afsint/vl_opcodes.h: vl_opcodes.h
189         ${INSTALL} $? $@
190
191 ${KERNELDIR}/afsint/vldbint.h: vldbint.h
192         ${INSTALL} $? $@
193
194 ${UKERNELDIR}/afsint/Kvldbint.cs.c: Kvldbint.cs.c
195         ${INSTALL} $? $@
196
197 ${UKERNELDIR}/afsint/Kvldbint.xdr.c: Kvldbint.xdr.c
198         ${INSTALL} $? $@
199
200 ${UKERNELDIR}/afsint/vl_opcodes.h: vl_opcodes.h
201         ${INSTALL} $? $@
202
203 ${UKERNELDIR}/afsint/vldbint.h: vldbint.h
204         ${INSTALL} $? $@
205
206 install: \
207         ${DESTDIR}${afssrvlibexecdir}/vlserver \
208         ${DESTDIR}${afssrvsbindir}/vldb_convert \
209         ${DESTDIR}${libdir}/afs/libvldb.a \
210         ${DESTDIR}${includedir}/afs/vl_opcodes.h \
211         ${DESTDIR}${includedir}/afs/vlserver.h \
212         ${DESTDIR}${includedir}/afs/vldbint.h \
213         ${DESTDIR}${includedir}/afs/cnvldb.h \
214         ${DESTDIR}${afssrvsbindir}/vldb_check
215
216 ${DESTDIR}${afssrvlibexecdir}/vlserver: vlserver
217         ${INSTALL} $? $@
218
219 ${DESTDIR}${afssrvsbindir}/vldb_convert: cnvldb
220         ${INSTALL} -f $? $@
221
222 ${DESTDIR}${libdir}/afs/libvldb.a: libvldb.a
223         ${INSTALL} $? $@
224
225 ${DESTDIR}${includedir}/afs/vl_opcodes.h: vl_opcodes.h
226         ${INSTALL} $? $@
227
228 ${DESTDIR}${includedir}/afs/vlserver.h: vlserver.h
229         ${INSTALL} $? $@
230
231 ${DESTDIR}${includedir}/afs/vldbint.h: vldbint.h
232         ${INSTALL} $? $@
233
234 ${DESTDIR}${includedir}/afs/cnvldb.h: cnvldb.h
235         ${INSTALL} $? $@
236
237 ${DESTDIR}${afssrvsbindir}/vldb_check: vldb_check
238         ${INSTALL} $? $@
239
240 dest: \
241         ${DEST}/root.server/usr/afs/bin/vlserver \
242         ${DEST}/etc/vldb_convert \
243         ${DEST}/lib/afs/libvldb.a \
244         ${DEST}/include/afs/vl_opcodes.h \
245         ${DEST}/include/afs/vlserver.h \
246         ${DEST}/include/afs/vldbint.h \
247         ${DEST}/include/afs/cnvldb.h \
248         ${DEST}/etc/vldb_check
249
250 ${DEST}/lib/afs/libvldb.a: libvldb.a
251         ${INSTALL} $? $@
252
253 ${DEST}/include/afs/vl_opcodes.h: vl_opcodes.h
254         ${INSTALL} $? $@
255
256 ${DEST}/include/afs/vlserver.h: vlserver.h
257         ${INSTALL} $? $@
258
259 ${DEST}/include/afs/vldbint.h: vldbint.h
260         ${INSTALL} $? $@
261
262 ${DEST}/include/afs/cnvldb.h: cnvldb.h
263         ${INSTALL} $? $@
264
265 ${DEST}/etc/vldb_check: vldb_check
266         ${INSTALL} $? $@
267
268 ${DEST}/root.server/usr/afs/bin/vlserver: vlserver
269         ${INSTALL} $? $@
270
271 ${DEST}/etc/vldb_convert: cnvldb
272         ${INSTALL} -f $? $@
273
274 #
275 # Misc targets
276 #
277 include ../config/Makefile.version
278
279 clean:
280         $(RM) -f *.o *.a *.otl *.xdr.c *.cs.c *.ss.c core \
281                 vlserver vlclient cnvldb vldbint.h vlserver.h vldb_check \
282                 vl_errors.c AFS_component_version_number.c