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 \
42 VSOBJS=vsprocs.o vsutils.o lockprocs.o volint.xdr.o volerr.o
43 SOBJS=volmain.o volprocs.o physio.o common.o voltrans.o volerr.o \
44 volint.cs.o dumpstuff.o volint.ss.o volint.xdr.o
46 all: volserver vos restorevol \
47 ${TOP_INCDIR}/afs/volser.h \
48 ${TOP_INCDIR}/afs/volint.h \
49 ${TOP_LIBDIR}/libvolser.a
51 restorevol: restorevol.c
52 ${CC} ${CFLAGS} -o restorevol ${srcdir}/restorevol.c \
53 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a
55 vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
56 ${CC} ${LDFLAGS} -o vos vos.o $(VSOBJS) libvolser.a ${LIBS} ${XLIBS}
58 volserver: $(SOBJS) $(LIBS) ${TOP_LIBDIR}/libdir.a
59 ${CC} ${DBUG} -o volserver $(SOBJS) ${TOP_LIBDIR}/libdir.a \
60 ${LDFLAGS} $(LIBS) ${XLIBS}
62 libvolser.a: volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o
64 $(AR) crv $@ volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o
67 volser.h volerr.c: volerr.et volser.p.h
68 $(RM) -f volser.h volerr.c
69 ${COMPILE_ET} -p ${srcdir} volerr -h volser
71 volint.cs.c: volint.xg
72 ${RXGEN} -x -C -o $@ ${srcdir}/volint.xg
74 volint.ss.c: volint.xg
75 ${RXGEN} -x -S -o $@ ${srcdir}/volint.xg
77 volint.xdr.c: volint.xg
78 ${RXGEN} -x -c -o $@ ${srcdir}/volint.xg
81 ${RXGEN} -x -h -o $@ ${srcdir}/volint.xg
85 volint.xdr.c: volint.h
90 volint.cs.o: volint.cs.c ${INTINCLS}
91 volint.ss.o: volint.ss.c ${INTINCLS}
92 volint.xdr.o: volint.xdr.c ${INTINCLS}
93 vsutils.o: vsutils.c ${VINCLS} ${RINCLS} ${INTINCLS}
94 volmain.o: volmain.c ${VINCLS} ${RINCLS} AFS_component_version_number.c
95 volprocs.o: volprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
96 dumpstuff.o: dumpstuff.c ${VINCLS} ${RINCLS} ${INTINCLS}
97 voldump.o: voldump.c ${VINCLS} ${RINCLS}
98 vos.o: vos.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
99 vsprocs.o: vsprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
100 physio.o: physio.c ${VINCLS}
101 common.o: common.c ${VINCLS}
102 lockprocs.o: lockprocs.c ${VINCLS} ${INTINCLS} ${RINCLS}
105 # Installation targets
108 ${DESTDIR}${sbindir}/restorevol \
109 ${DESTDIR}${includedir}/afs/volser.h \
110 ${DESTDIR}${includedir}/afs/volint.h \
111 ${DESTDIR}${sbindir}/vos \
112 ${DESTDIR}${afssrvsbindir}/vos \
113 ${DESTDIR}${afssrvlibexecdir}/volserver \
114 ${DESTDIR}${libdir}/afs/libvolser.a
117 ${DEST}/include/afs/volser.h: volser.h
120 ${DEST}/include/afs/volint.h: volint.h
123 ${DEST}/etc/restorevol: restorevol
126 ${DEST}/etc/vos ${DEST}/root.server/usr/afs/bin/vos: vos
129 ${DEST}/lib/afs/libvolser.a: libvolser.a
132 ${DEST}/root.server/usr/afs/bin/volserver: volserver
139 $(RM) -f *.o *.a core volserver volint.ss.c volint.cs.c volint.h \
140 volint.xdr.c vos volser.h volerr.c AFS_component_version_number.c restorevol
142 include ../config/Makefile.version
144 ${DESTDIR}${sbindir}/restorevol: restorevol
147 ${DESTDIR}${includedir}/afs/volser.h: volser.h
150 ${TOP_INCDIR}/afs/volser.h: volser.h
153 ${DESTDIR}${includedir}/afs/volint.h: volint.h
156 ${TOP_INCDIR}/afs/volint.h: volint.h
159 ${DESTDIR}${sbindir}/vos: vos
162 ${DESTDIR}${afssrvsbindir}/vos: vos
165 ${DESTDIR}${afssrvlibexecdir}/volserver: volserver
168 ${DESTDIR}${libdir}/afs/libvolser.a: libvolser.a
171 ${TOP_LIBDIR}/libvolser.a: libvolser.a
175 ${DEST}/etc/restorevol \
176 ${DEST}/include/afs/volser.h \
177 ${DEST}/include/afs/volint.h \
179 ${DEST}/root.server/usr/afs/bin/vos \
180 ${DEST}/root.server/usr/afs/bin/volserver \
181 ${DEST}/lib/afs/libvolser.a
185 sh $(HELPER_SPLINT) $(CFLAGS) \
187 vsprocs.c vsutils.c lockprocs.c volerr.c \
188 volmain.c volprocs.c physio.c common.c voltrans.c \