Reduce warnings in vos.c
[openafs.git] / src / volser / 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 HELPER_SPLINT=@HELPER_SPLINT@
15
16
17 VINCLS=${TOP_INCDIR}/afs/partition.h ${TOP_INCDIR}/afs/volume.h \
18         ${TOP_INCDIR}/afs/vlserver.h vol.h dump.h volser.h  lockdata.h
19
20 RINCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
21        ${TOP_INCDIR}/afs/keys.h ${TOP_INCDIR}/afs/cellconfig.h \
22         ${TOP_INCDIR}/ubik.h ${TOP_INCDIR}/afs/cmd.h
23
24 INTINCLS=volint.h volser.h 
25
26 LIBS=\
27         ${TOP_LIBDIR}/libaudit.a \
28         ${TOP_LIBDIR}/vlib.a \
29         ${TOP_LIBDIR}/libacl.a \
30         ${TOP_LIBDIR}/libsys.a \
31         ${TOP_LIBDIR}/libvldb.a \
32         ${TOP_LIBDIR}/libubik.a \
33         ${TOP_LIBDIR}/libauth.a \
34         ${TOP_LIBDIR}/libcmd.a \
35         ${TOP_LIBDIR}/librxkad.a \
36         ${TOP_LIBDIR}/libdes.a \
37         ${TOP_LIBDIR}/librxstat.a \
38         ${TOP_LIBDIR}/librx.a \
39         ${TOP_LIBDIR}/liblwp.a \
40         ${TOP_LIBDIR}/libsys.a \
41         ${TOP_LIBDIR}/libcom_err.a \
42         ${TOP_LIBDIR}/libkauth.a \
43         ${TOP_LIBDIR}/libusd.a \
44         ${TOP_LIBDIR}/util.a
45
46 VOLDUMP_LIBS = \
47         ../vol/ihandle.o \
48         ../vol/physio.o \
49         ../vol/vlib.a \
50         ${TOP_LIBDIR}/libcmd.a \
51         ${TOP_LIBDIR}/util.a \
52         ${TOP_LIBDIR}/libsys.a \
53         ${TOP_LIBDIR}/libdir.a \
54         ${TOP_LIBDIR}/liblwp.a  \
55         ${TOP_LIBDIR}/libacl.a
56
57 VSOBJS=vsprocs.o vsutils.o lockprocs.o volint.xdr.o volerr.o 
58 SOBJS=volmain.o volprocs.o physio.o common.o voltrans.o volerr.o \
59  volint.cs.o dumpstuff.o volint.ss.o volint.xdr.o vol_split.o
60
61 all: volserver vos restorevol voldump \
62         ${TOP_INCDIR}/afs/volser.h \
63         ${TOP_INCDIR}/afs/vsutils_prototypes.h \
64         ${TOP_INCDIR}/afs/volint.h \
65         ${TOP_LIBDIR}/libvolser.a
66
67 ${TOP_INCDIR}/afs/vsutils_prototypes.h: vsutils_prototypes.h
68         ${INSTALL_DATA} $? $@
69
70 ${TOP_INCDIR}/afs/volser.h: volser.h
71         ${INSTALL_DATA} $? $@
72
73 ${TOP_INCDIR}/afs/volint.h: volint.h
74         ${INSTALL_DATA} $? $@
75
76 ${TOP_LIBDIR}/libvolser.a: libvolser.a
77         ${INSTALL_DATA} $? $@
78
79 restorevol: restorevol.c
80         ${CC} ${CFLAGS} -o restorevol ${srcdir}/restorevol.c \
81                 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS}
82
83 vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
84         ${CC} ${LDFLAGS} -o vos vos.o $(VSOBJS) libvolser.a ${LIBS} ${XLIBS}
85
86 volserver: $(SOBJS) $(LIBS) ${TOP_LIBDIR}/libdir.a
87         ${CC} ${DBUG} -o volserver $(SOBJS) ${TOP_LIBDIR}/libdir.a \
88                 ${LDFLAGS} $(LIBS) ${XLIBS}
89
90 voldump: vol-dump.o ${VOLDUMP_LIBS}
91         ${CC} ${CFLAGS} -o voldump vol-dump.o ${VOLDUMP_LIBS} ${XLIBS}
92
93 libvolser.a: volint.cs.o  $(VSOBJS) volint.ss.o AFS_component_version_number.o
94         -$(RM) -f $@
95         $(AR) crv $@ volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o 
96         $(RANLIB) $@
97
98 volser.h: volerr.c
99
100 volerr.c: volerr.et volser.p.h
101         $(RM) -f volser.h volerr.c
102         ${COMPILE_ET} -p ${srcdir} volerr -h volser
103
104 volint.cs.c: volint.xg
105         ${RXGEN} -A -x -C -o $@ ${srcdir}/volint.xg
106
107 volint.ss.c: volint.xg
108         ${RXGEN} -A -x -S -o $@ ${srcdir}/volint.xg
109
110 volint.xdr.c: volint.xg
111         ${RXGEN} -A -x -c -o $@ ${srcdir}/volint.xg
112
113 volint.h: volint.xg
114         ${RXGEN} -A -x -h -o $@ ${srcdir}/volint.xg
115
116 volint.cs.c: volint.h
117 volint.ss.c: volint.h
118 volint.xdr.c: volint.h
119
120 #
121 # Dependencies
122 #
123 volint.cs.o: volint.cs.c ${INTINCLS}
124 volint.ss.o: volint.ss.c ${INTINCLS}
125 volint.xdr.o: volint.xdr.c ${INTINCLS}
126 vsutils.o: vsutils.c ${VINCLS} ${RINCLS} ${INTINCLS}
127 volmain.o: volmain.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
128 volprocs.o: volprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
129 dumpstuff.o: dumpstuff.c ${VINCLS} ${RINCLS} ${INTINCLS}
130 voldump.o: voldump.c ${VINCLS} ${RINCLS}
131 vos.o: vos.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
132 vsprocs.o: vsprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
133 physio.o: physio.c ${VINCLS}
134 common.o: common.c ${VINCLS}
135 lockprocs.o: lockprocs.c ${VINCLS} ${INTINCLS} ${RINCLS}
136 vol_split.o: vol_split.c ${VINCLS} ${INTINCLS} ${RINCLS}
137
138 #
139 # Errors
140 #
141 vos.o: vos.c
142         $(CC) $(CFLAGS) -c $<
143
144 #
145 # Installation targets
146 #
147 install: restorevol voldump volser.h volint.h vos volserver libvolser.a
148         ${INSTALL} -d ${DESTDIR}${sbindir}
149         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
150         ${INSTALL} -d ${DESTDIR}${includedir}/afs
151         ${INSTALL} -d ${DESTDIR}${libdir}/afs
152         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
153         ${INSTALL_PROGRAM} restorevol ${DESTDIR}${bindir}/restorevol
154         ${INSTALL_PROGRAM} voldump ${DESTDIR}${sbindir}/voldump
155         ${INSTALL_DATA} volser.h ${DESTDIR}${includedir}/afs/volser.h
156         ${INSTALL_DATA} volint.h ${DESTDIR}${includedir}/afs/volint.h
157         ${INSTALL_DATA} vsutils_prototypes.h ${DESTDIR}${includedir}/afs/vsutils_prototypes.h
158         ${INSTALL_PROGRAM} vos ${DESTDIR}${sbindir}/vos
159         ${INSTALL_PROGRAM} vos ${DESTDIR}${afssrvsbindir}/vos
160         ${INSTALL_DATA} libvolser.a ${DESTDIR}${libdir}/afs/libvolser.a
161         @case ${SYS_NAME} in \
162         alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
163                 echo "Don't install volserver for ${SYS_NAME}" ;; \
164         *_darwin_[1-6][0-9]) \
165                 echo ${INSTALL} volserver \
166                         ${DESTDIR}${afssrvlibexecdir}/volserver ; \
167                 ${INSTALL} volserver \
168                         ${DESTDIR}${afssrvlibexecdir}/volserver ;; \
169         *_darwin_*) \
170                 echo "Don't install volserver for ${SYS_NAME}" ;; \
171         *) \
172                 echo ${INSTALL_PRORAM} volserver \
173                         ${DESTDIR}${afssrvlibexecdir}/volserver ; \
174                 ${INSTALL} volserver \
175                         ${DESTDIR}${afssrvlibexecdir}/volserver ;; \
176         esac
177
178 dest: restorevol voldump volser.h volint.h vos volserver libvolser.a
179         ${INSTALL} -d ${DEST}/etc
180         ${INSTALL} -d ${DEST}/include/afs
181         ${INSTALL} -d ${DEST}/lib/afs
182         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
183         ${INSTALL_PROGRAM} restorevol ${DEST}/etc/restorevol
184         ${INSTALL_PROGRAM} voldump ${DEST}/etc/voldump
185         ${INSTALL_DATA} volser.h ${DEST}/include/afs/volser.h
186         ${INSTALL_DATA} volint.h ${DEST}/include/afs/volint.h
187         ${INSTALL_DATA} vsutils_prototypes.h ${DEST}/include/afs/vsutils_prototypes.h
188         ${INSTALL_PROGRAM} vos ${DEST}/etc/vos
189         ${INSTALL_PROGRAM} vos ${DEST}/root.server/usr/afs/bin/vos
190         ${INSTALL_DATA} libvolser.a ${DEST}/lib/afs/libvolser.a
191         @case ${SYS_NAME} in \
192         alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
193                 echo "Don't install volserver for ${SYS_NAME}" ;; \
194         *_darwin_[1-6][0-9]) \
195                 echo ${INSTALL} volserver \
196                         ${DEST}/root.server/usr/afs/bin/volserver ; \
197                 ${INSTALL} -ns volserver \
198                         ${DEST}/root.server/usr/afs/bin/volserver ;; \
199         *_darwin_*) \
200                 echo "Don't install volserver for ${SYS_NAME}" ;; \
201         *) \
202                 echo ${INSTALL} volserver \
203                         ${DEST}/root.server/usr/afs/bin/volserver ; \
204                 ${INSTALL} volserver \
205                         ${DEST}/root.server/usr/afs/bin/volserver ;; \
206         esac
207
208 #
209 # Misc targets
210
211 clean:
212         $(RM) -f *.o *.a core volserver volint.ss.c volint.cs.c volint.h \
213         volint.xdr.c vos volser.h volerr.c AFS_component_version_number.c restorevol voldump
214
215 check-splint::
216         sh $(HELPER_SPLINT) $(CFLAGS) \
217             vos.c restorevol.c \
218             vsprocs.c vsutils.c lockprocs.c volerr.c \
219             volmain.c volprocs.c physio.c common.c voltrans.c \
220             dumpstuff.c vol_split.c
221
222 include ../config/Makefile.version