makefiles-cflag-cleanup-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}/libcmd.a \
30         ${TOP_LIBDIR}/libsys.a \
31         ${TOP_LIBDIR}/libafsutil.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 ${LIBS}
49         $(CC) ${CFLAGS} -o vldb_check vldb_check.o ${LIBS} ${XLIBS} 
50
51 vldb_check.o: vldb_check.c AFS_component_version_number.o
52
53 cnvldb: cnvldb.o ${LIBS}
54         $(CC) ${CFLAGS} -o cnvldb cnvldb.o ${LIBS} ${XLIBS}
55
56 cnvldb.o: cnvldb.c cnvldb.h AFS_component_version_number.o
57
58 sascnvldb: sascnvldb.o ${LIBS}
59         $(CC) ${CFLAGS} -o sascnvldb sascnvldb.o ${LIBS} ${XLIBS}
60
61 sascnvldb.o: sascnvldb.c cnvldb.h AFS_component_version_number.o
62
63 vlserver: vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.o $(LIBS)
64         $(CC) ${CFLAGS} -o vlserver vlserver.o vlutils.o vlprocs.o vldbint.ss.o \
65                 vldbint.xdr.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libaudit.a
66
67 vlserver.o: vlserver.c ${INCLS} AFS_component_version_number.o
68 vlutils.o: vlutils.c ${INCLS}
69 vlprocs.o: vlprocs.c ${INCLS}
70 vldbint.ss.o: vldbint.ss.c vldbint.xdr.c
71 vldbint.cs.o: vldbint.cs.c vldbint.xdr.c
72 vldbint.xdr.o: vldbint.xdr.c vldbint.h
73
74 vldbint.cs.c: vldbint.xg
75         ${RXGEN} -x -C -o $@ ${srcdir}/vldbint.xg
76
77 vldbint.ss.c: vldbint.xg
78         ${RXGEN} -x -S -o $@ ${srcdir}/vldbint.xg
79
80 vldbint.xdr.c: vldbint.xg
81         ${RXGEN} -x -c -o $@ ${srcdir}/vldbint.xg
82
83 vldbint.h: vldbint.xg
84         ${RXGEN} -x -h -o $@ ${srcdir}/vldbint.xg
85
86 vldbint.cs.c: vldbint.h
87 vldbint.ss.c: vldbint.h
88 vldbint.xdr.c: vldbint.h
89
90 Kvldbint.cs.c: vldbint.xg
91         ${RXGEN} -x -k -C -o $@ ${srcdir}/vldbint.xg
92
93 Kvldbint.xdr.c: vldbint.xg
94         ${RXGEN} -x -k -c -o $@ ${srcdir}/vldbint.xg
95
96 libvldb.a: $(OBJS) AFS_component_version_number.o
97         $(RM) -f $@
98         $(AR) crv $@ $(OBJS) AFS_component_version_number.o
99         $(RANLIB) $@
100
101 vlclient: vlclient.o libvldb.a $(LIBS)
102         $(CC) ${CFLAGS} -o vlclient vlclient.o libvldb.a $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libcmd.a
103
104 vlclient.o: vlclient.c ${INCLS} AFS_component_version_number.o
105
106 vl_errors.o: vl_errors.c
107 vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
108         $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
109
110 system: install
111
112 ${DEST}/root.server/usr/afs/bin/vlserver: vlserver
113         ${INSTALL} $? $@
114
115 ${DEST}/etc/vldb_convert: cnvldb
116         ${INSTALL} -f $? $@
117
118 ${TOP_LIBDIR}/libvldb.a: libvldb.a
119         ${INSTALL} $? $@
120
121 ${TOP_INCDIR}/afs/vl_opcodes.h: vl_opcodes.h
122         ${INSTALL} $? $@
123
124 ${TOP_INCDIR}/afs/vlserver.h: vlserver.h
125         ${INSTALL} $? $@
126
127 ${TOP_INCDIR}/afs/vldbint.h: vldbint.h
128         ${INSTALL} $? $@
129
130 ${TOP_INCDIR}/afs/cnvldb.h: cnvldb.h
131         ${INSTALL} $? $@
132
133 install: \
134         ${DESTDIR}${afssrvlibexecdir}/vlserver \
135         ${DESTDIR}${afssrvsbindir}/vldb_convert \
136         ${DESTDIR}${libdir}/afs/libvldb.a \
137         ${DESTDIR}${includedir}/afs/vl_opcodes.h \
138         ${DESTDIR}${includedir}/afs/vlserver.h \
139         ${DESTDIR}${includedir}/afs/vldbint.h \
140         ${DESTDIR}${includedir}/afs/cnvldb.h \
141         ${DESTDIR}${afssrvsbindir}/vldb_check
142
143 ${DESTDIR}${afssrvlibexecdir}/vlserver: vlserver
144         ${INSTALL} $? $@
145
146 ${DESTDIR}${afssrvsbindir}/vldb_convert: cnvldb
147         ${INSTALL} -f $? $@
148
149 ${DESTDIR}${libdir}/afs/libvldb.a: libvldb.a
150         ${INSTALL} $? $@
151
152 ${DESTDIR}${includedir}/afs/vl_opcodes.h: vl_opcodes.h
153         ${INSTALL} $? $@
154
155 ${DESTDIR}${includedir}/afs/vlserver.h: vlserver.h
156         ${INSTALL} $? $@
157
158 ${DESTDIR}${includedir}/afs/vldbint.h: vldbint.h
159         ${INSTALL} $? $@
160
161 ${DESTDIR}${includedir}/afs/cnvldb.h: cnvldb.h
162         ${INSTALL} $? $@
163
164 ${DESTDIR}${afssrvsbindir}/vldb_check: vldb_check
165         ${INSTALL} $? $@
166
167 dest: \
168         ${DEST}/root.server/usr/afs/bin/vlserver \
169         ${DEST}/etc/vldb_convert \
170         ${DEST}/lib/afs/libvldb.a \
171         ${DEST}/include/afs/vl_opcodes.h \
172         ${DEST}/include/afs/vlserver.h \
173         ${DEST}/include/afs/vldbint.h \
174         ${DEST}/include/afs/cnvldb.h \
175         ${DEST}/etc/vldb_check
176
177 ${DEST}/lib/afs/libvldb.a: libvldb.a
178         ${INSTALL} $? $@
179
180 ${DEST}/include/afs/vl_opcodes.h: vl_opcodes.h
181         ${INSTALL} $? $@
182
183 ${DEST}/include/afs/vlserver.h: vlserver.h
184         ${INSTALL} $? $@
185
186 ${DEST}/include/afs/vldbint.h: vldbint.h
187         ${INSTALL} $? $@
188
189 ${DEST}/include/afs/cnvldb.h: cnvldb.h
190         ${INSTALL} $? $@
191
192 ${DEST}/etc/vldb_check: vldb_check
193         ${INSTALL} $? $@
194
195 #
196 # Misc targets
197 #
198 include ../config/Makefile.version
199
200 clean:
201         $(RM) -f *.o *.a *.otl *.xdr.c *.cs.c *.ss.c core \
202                 vlserver vlclient cnvldb vldbint.h vlserver.h vldb_check \
203                 vl_errors.c AFS_component_version_number.c