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
10 HELPER_SPLINT=@HELPER_SPLINT@
13 VINCLS=${TOP_INCDIR}/afs/partition.h ${TOP_INCDIR}/afs/volume.h \
14 ${TOP_INCDIR}/afs/vlserver.h vol.h dump.h volser.h lockdata.h
16 RINCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
17 ${TOP_INCDIR}/afs/keys.h ${TOP_INCDIR}/afs/cellconfig.h \
18 ${TOP_INCDIR}/ubik.h ${TOP_INCDIR}/afs/cmd.h
20 INTINCLS=volint.h volser.h
23 ${TOP_LIBDIR}/libaudit.a \
24 ${TOP_LIBDIR}/vlib.a \
25 ${TOP_LIBDIR}/libacl.a \
26 ${TOP_LIBDIR}/libsys.a \
27 ${TOP_LIBDIR}/libvldb.a \
28 ${TOP_LIBDIR}/libubik.a \
29 ${TOP_LIBDIR}/libauth.a \
30 ${TOP_LIBDIR}/libcmd.a \
31 ${TOP_LIBDIR}/librxkad.a \
32 ${TOP_LIBDIR}/libdes.a \
33 ${TOP_LIBDIR}/librxstat.a \
34 ${TOP_LIBDIR}/librx.a \
35 ${TOP_LIBDIR}/liblwp.a \
36 ${TOP_LIBDIR}/libsys.a \
37 ${TOP_LIBDIR}/libcom_err.a \
38 ${TOP_LIBDIR}/libkauth.a \
39 ${TOP_LIBDIR}/libusd.a \
46 ${TOP_LIBDIR}/libcmd.a \
47 ${TOP_LIBDIR}/util.a \
48 ${TOP_LIBDIR}/libsys.a \
49 ${TOP_LIBDIR}/libdir.a \
50 ${TOP_LIBDIR}/liblwp.a \
51 ${TOP_LIBDIR}/libacl.a
53 VSOBJS=vsprocs.o vsutils.o lockprocs.o volint.xdr.o volerr.o
54 SOBJS=volmain.o volprocs.o physio.o common.o voltrans.o volerr.o \
55 volint.cs.o dumpstuff.o volint.ss.o volint.xdr.o vol_split.o
57 all: volserver vos restorevol voldump \
58 ${TOP_INCDIR}/afs/volser.h \
59 ${TOP_INCDIR}/afs/vsutils_prototypes.h \
60 ${TOP_INCDIR}/afs/volint.h \
61 ${TOP_LIBDIR}/libvolser.a
63 restorevol: restorevol.c
64 ${CC} ${CFLAGS} -o restorevol ${srcdir}/restorevol.c \
65 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS}
67 vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
68 ${CC} ${LDFLAGS} -o vos vos.o $(VSOBJS) libvolser.a ${LIBS} ${XLIBS}
70 volserver: $(SOBJS) $(LIBS) ${TOP_LIBDIR}/libdir.a
71 ${CC} ${DBUG} -o volserver $(SOBJS) ${TOP_LIBDIR}/libdir.a \
72 ${LDFLAGS} $(LIBS) ${XLIBS}
74 voldump: vol-dump.o ${VOLDUMP_LIBS}
75 ${CC} ${CFLAGS} -o voldump vol-dump.o ${VOLDUMP_LIBS} ${XLIBS}
77 libvolser.a: volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o
79 $(AR) crv $@ volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o
82 volser.h volerr.c: volerr.et volser.p.h
83 $(RM) -f volser.h volerr.c
84 ${COMPILE_ET} -p ${srcdir} volerr -h volser
86 volint.cs.c: volint.xg
87 ${RXGEN} -A -x -C -o $@ ${srcdir}/volint.xg
89 volint.ss.c: volint.xg
90 ${RXGEN} -A -x -S -o $@ ${srcdir}/volint.xg
92 volint.xdr.c: volint.xg
93 ${RXGEN} -A -x -c -o $@ ${srcdir}/volint.xg
96 ${RXGEN} -A -x -h -o $@ ${srcdir}/volint.xg
100 volint.xdr.c: volint.h
105 volint.cs.o: volint.cs.c ${INTINCLS}
106 volint.ss.o: volint.ss.c ${INTINCLS}
107 volint.xdr.o: volint.xdr.c ${INTINCLS}
108 vsutils.o: vsutils.c ${VINCLS} ${RINCLS} ${INTINCLS}
109 volmain.o: volmain.c ${VINCLS} ${RINCLS} AFS_component_version_number.c
110 volprocs.o: volprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
111 dumpstuff.o: dumpstuff.c ${VINCLS} ${RINCLS} ${INTINCLS}
112 voldump.o: voldump.c ${VINCLS} ${RINCLS}
113 vos.o: vos.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
114 vsprocs.o: vsprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
115 physio.o: physio.c ${VINCLS}
116 common.o: common.c ${VINCLS}
117 lockprocs.o: lockprocs.c ${VINCLS} ${INTINCLS} ${RINCLS}
118 vol_split.o: vol_split.c ${VINCLS} ${INTINCLS} ${RINCLS}
121 # Installation targets
124 ${DESTDIR}${sbindir}/restorevol \
125 ${DESTDIR}${sbindir}/voldump \
126 ${DESTDIR}${includedir}/afs/volser.h \
127 ${DESTDIR}${includedir}/afs/volint.h \
128 ${DESTDIR}${sbindir}/vos \
129 ${DESTDIR}${afssrvsbindir}/vos \
130 ${DESTDIR}${afssrvlibexecdir}/volserver \
131 ${DESTDIR}${libdir}/afs/libvolser.a
134 ${DEST}/include/afs/volser.h: volser.h
137 ${DEST}/include/afs/vsutils_prototypes.h: vsutils_prototypes.h
140 ${DEST}/include/afs/volint.h: volint.h
143 ${DEST}/etc/restorevol: restorevol
146 ${DEST}/etc/voldump: voldump
149 ${DEST}/etc/vos ${DEST}/root.server/usr/afs/bin/vos: vos
152 ${DEST}/lib/afs/libvolser.a: libvolser.a
155 ${DEST}/root.server/usr/afs/bin/volserver: volserver
156 @case ${SYS_NAME} in \
157 alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
158 echo "Don't install volserver for ${SYS_NAME}" ;; \
159 *_darwin_[1-6][0-9]) \
160 echo ${INSTALL} -ns $? $@ ; \
161 ${INSTALL} -ns $? $@ ;; \
163 echo "Don't install volserver for ${SYS_NAME}" ;; \
165 echo ${INSTALL} -ns $? $@ ; \
166 ${INSTALL} -ns $? $@ ;; \
173 $(RM) -f *.o *.a core volserver volint.ss.c volint.cs.c volint.h \
174 volint.xdr.c vos volser.h volerr.c AFS_component_version_number.c restorevol voldump
176 include ../config/Makefile.version
178 ${DESTDIR}${sbindir}/restorevol: restorevol
181 ${DESTDIR}${sbindir}/voldump: voldump
184 ${DESTDIR}${includedir}/afs/volser.h: volser.h
187 ${TOP_INCDIR}/afs/volser.h: volser.h
190 ${DESTDIR}${includedir}/afs/vsutils_prototypes.h: vsutils_prototypes.h
193 ${TOP_INCDIR}/afs/vsutils_prototypes.h: vsutils_prototypes.h
196 ${DESTDIR}${includedir}/afs/volint.h: volint.h
199 ${TOP_INCDIR}/afs/volint.h: volint.h
202 ${DESTDIR}${sbindir}/vos: vos
205 ${DESTDIR}${afssrvsbindir}/vos: vos
208 ${DESTDIR}${afssrvlibexecdir}/volserver: volserver
209 @case ${SYS_NAME} in \
210 alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
211 echo "Don't install volserver for ${SYS_NAME}" ;; \
212 *_darwin_[1-6][0-9]) \
213 echo ${INSTALL} -ns $? $@ ; \
214 ${INSTALL} -ns $? $@ ;; \
216 echo "Don't install volserver for ${SYS_NAME}" ;; \
218 echo ${INSTALL} -ns $? $@ ; \
219 ${INSTALL} -ns $? $@ ;; \
222 ${DESTDIR}${libdir}/afs/libvolser.a: libvolser.a
225 ${TOP_LIBDIR}/libvolser.a: libvolser.a
229 ${DEST}/etc/restorevol \
230 ${DEST}/etc/voldump \
231 ${DEST}/include/afs/volser.h \
232 ${DEST}/include/afs/vsutils_prototypes.h \
233 ${DEST}/include/afs/volint.h \
235 ${DEST}/root.server/usr/afs/bin/vos \
236 ${DEST}/root.server/usr/afs/bin/volserver \
237 ${DEST}/lib/afs/libvolser.a
241 sh $(HELPER_SPLINT) $(CFLAGS) \
243 vsprocs.c vsutils.c lockprocs.c volerr.c \
244 volmain.c volprocs.c physio.c common.c voltrans.c \
245 dumpstuff.c vol_split.c