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