1 # Copyright 2000, International Business Machines Corporation and others.
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
9 include @TOP_OBJDIR@/src/config/Makefile.config
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
14 HELPER_SPLINT=@HELPER_SPLINT@
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
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
24 INTINCLS=volint.h volser.h volser_prototypes.h volser_internal.h
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 \
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
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
61 all: volserver vos restorevol voldump \
62 ${TOP_INCDIR}/afs/volser.h \
63 ${TOP_INCDIR}/afs/vsutils_prototypes.h \
64 ${TOP_INCDIR}/afs/volser_prototypes.h \
65 ${TOP_INCDIR}/afs/volint.h \
66 ${TOP_LIBDIR}/libvolser.a
68 ${TOP_INCDIR}/afs/vsutils_prototypes.h: vsutils_prototypes.h
71 ${TOP_INCDIR}/afs/volser_prototypes.h: volser_prototypes.h
74 ${TOP_INCDIR}/afs/volser.h: volser.h
77 ${TOP_INCDIR}/afs/volint.h: volint.h
80 ${TOP_LIBDIR}/libvolser.a: libvolser.a
83 restorevol: restorevol.c
84 ${CC} ${CFLAGS} -o restorevol ${srcdir}/restorevol.c \
85 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS}
87 vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
88 ${CC} ${LDFLAGS} -o vos vos.o $(VSOBJS) libvolser.a ${LIBS} ${XLIBS}
90 volserver: $(SOBJS) $(LIBS) ${TOP_LIBDIR}/libdir.a
91 ${CC} ${DBUG} -o volserver $(SOBJS) ${TOP_LIBDIR}/libdir.a \
92 ${LDFLAGS} $(LIBS) ${XLIBS}
94 voldump: vol-dump.o ${VOLDUMP_LIBS}
95 ${CC} ${CFLAGS} -o voldump vol-dump.o ${VOLDUMP_LIBS} ${XLIBS}
97 libvolser.a: volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o
99 $(AR) crv $@ volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o
104 volerr.c: volerr.et volser.p.h
105 $(RM) -f volser.h volerr.c
106 ${COMPILE_ET} -p ${srcdir} volerr -h volser
108 volint.cs.c: volint.xg
109 ${RXGEN} -A -x -C -o $@ ${srcdir}/volint.xg
111 volint.ss.c: volint.xg
112 ${RXGEN} -A -x -S -o $@ ${srcdir}/volint.xg
114 volint.xdr.c: volint.xg
115 ${RXGEN} -A -x -c -o $@ ${srcdir}/volint.xg
118 ${RXGEN} -A -x -h -o $@ ${srcdir}/volint.xg
120 volint.cs.c: volint.h
121 volint.ss.c: volint.h
122 volint.xdr.c: volint.h
127 volint.cs.o: volint.cs.c ${INTINCLS}
128 volint.ss.o: volint.ss.c ${INTINCLS}
129 volint.xdr.o: volint.xdr.c ${INTINCLS}
130 vsutils.o: vsutils.c ${VINCLS} ${RINCLS} ${INTINCLS}
131 volmain.o: volmain.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
132 volprocs.o: volprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
133 dumpstuff.o: dumpstuff.c ${VINCLS} ${RINCLS} ${INTINCLS}
134 voldump.o: voldump.c ${VINCLS} ${RINCLS}
135 vos.o: vos.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
136 vsprocs.o: vsprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
137 physio.o: physio.c ${VINCLS}
138 common.o: common.c ${VINCLS}
139 lockprocs.o: lockprocs.c ${VINCLS} ${INTINCLS} ${RINCLS}
140 vol_split.o: vol_split.c ${VINCLS} ${INTINCLS} ${RINCLS}
146 $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
149 # Installation targets
151 install: restorevol voldump volser.h volint.h vos volserver libvolser.a
152 ${INSTALL} -d ${DESTDIR}${sbindir}
153 ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
154 ${INSTALL} -d ${DESTDIR}${includedir}/afs
155 ${INSTALL} -d ${DESTDIR}${libdir}/afs
156 ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
157 ${INSTALL_PROGRAM} restorevol ${DESTDIR}${bindir}/restorevol
158 ${INSTALL_PROGRAM} voldump ${DESTDIR}${sbindir}/voldump
159 ${INSTALL_DATA} volser.h ${DESTDIR}${includedir}/afs/volser.h
160 ${INSTALL_DATA} volint.h ${DESTDIR}${includedir}/afs/volint.h
161 ${INSTALL_DATA} vsutils_prototypes.h ${DESTDIR}${includedir}/afs/vsutils_prototypes.h
162 ${INSTALL_PROGRAM} vos ${DESTDIR}${sbindir}/vos
163 ${INSTALL_PROGRAM} vos ${DESTDIR}${afssrvsbindir}/vos
164 ${INSTALL_DATA} libvolser.a ${DESTDIR}${libdir}/afs/libvolser.a
165 @case ${SYS_NAME} in \
166 alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
167 echo "Don't install volserver for ${SYS_NAME}" ;; \
168 *_darwin_[1-6][0-9]) \
169 echo ${INSTALL} volserver \
170 ${DESTDIR}${afssrvlibexecdir}/volserver ; \
171 ${INSTALL} volserver \
172 ${DESTDIR}${afssrvlibexecdir}/volserver ;; \
174 echo "Don't install volserver for ${SYS_NAME}" ;; \
176 echo ${INSTALL_PRORAM} volserver \
177 ${DESTDIR}${afssrvlibexecdir}/volserver ; \
178 ${INSTALL} volserver \
179 ${DESTDIR}${afssrvlibexecdir}/volserver ;; \
182 dest: restorevol voldump volser.h volint.h vos volserver libvolser.a
183 ${INSTALL} -d ${DEST}/etc
184 ${INSTALL} -d ${DEST}/include/afs
185 ${INSTALL} -d ${DEST}/lib/afs
186 ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
187 ${INSTALL_PROGRAM} restorevol ${DEST}/etc/restorevol
188 ${INSTALL_PROGRAM} voldump ${DEST}/etc/voldump
189 ${INSTALL_DATA} volser.h ${DEST}/include/afs/volser.h
190 ${INSTALL_DATA} volint.h ${DEST}/include/afs/volint.h
191 ${INSTALL_DATA} vsutils_prototypes.h ${DEST}/include/afs/vsutils_prototypes.h
192 ${INSTALL_PROGRAM} vos ${DEST}/etc/vos
193 ${INSTALL_PROGRAM} vos ${DEST}/root.server/usr/afs/bin/vos
194 ${INSTALL_DATA} libvolser.a ${DEST}/lib/afs/libvolser.a
195 @case ${SYS_NAME} in \
196 alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
197 echo "Don't install volserver for ${SYS_NAME}" ;; \
198 *_darwin_[1-6][0-9]) \
199 echo ${INSTALL} volserver \
200 ${DEST}/root.server/usr/afs/bin/volserver ; \
201 ${INSTALL} -ns volserver \
202 ${DEST}/root.server/usr/afs/bin/volserver ;; \
204 echo "Don't install volserver for ${SYS_NAME}" ;; \
206 echo ${INSTALL} volserver \
207 ${DEST}/root.server/usr/afs/bin/volserver ; \
208 ${INSTALL} volserver \
209 ${DEST}/root.server/usr/afs/bin/volserver ;; \
216 $(RM) -f *.o *.a core volserver volint.ss.c volint.cs.c volint.h \
217 volint.xdr.c vos volser.h volerr.c AFS_component_version_number.c restorevol voldump
220 sh $(HELPER_SPLINT) $(CFLAGS) \
222 vsprocs.c vsutils.c lockprocs.c volerr.c \
223 volmain.c volprocs.c physio.c common.c voltrans.c \
224 dumpstuff.c vol_split.c
226 include ../config/Makefile.version