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
57 all: volserver vos restorevol voldump \
58 ${TOP_INCDIR}/afs/volser.h \
59 ${TOP_INCDIR}/afs/volint.h \
60 ${TOP_LIBDIR}/libvolser.a
62 restorevol: restorevol.c
63 ${CC} ${CFLAGS} -o restorevol ${srcdir}/restorevol.c \
64 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS}
66 vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
67 ${CC} ${LDFLAGS} -o vos vos.o $(VSOBJS) libvolser.a ${LIBS} ${XLIBS}
69 volserver: $(SOBJS) $(LIBS) ${TOP_LIBDIR}/libdir.a
70 ${CC} ${DBUG} -o volserver $(SOBJS) ${TOP_LIBDIR}/libdir.a \
71 ${LDFLAGS} $(LIBS) ${XLIBS}
73 voldump: vol-dump.o ${VOLDUMP_LIBS}
74 ${CC} ${CFLAGS} -o voldump vol-dump.o ${VOLDUMP_LIBS} ${XLIBS}
76 libvolser.a: volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o
78 $(AR) crv $@ volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o
81 volser.h volerr.c: volerr.et volser.p.h
82 $(RM) -f volser.h volerr.c
83 ${COMPILE_ET} -p ${srcdir} volerr -h volser
85 volint.cs.c: volint.xg
86 ${RXGEN} -x -C -o $@ ${srcdir}/volint.xg
88 volint.ss.c: volint.xg
89 ${RXGEN} -x -S -o $@ ${srcdir}/volint.xg
91 volint.xdr.c: volint.xg
92 ${RXGEN} -x -c -o $@ ${srcdir}/volint.xg
95 ${RXGEN} -x -h -o $@ ${srcdir}/volint.xg
99 volint.xdr.c: volint.h
104 volint.cs.o: volint.cs.c ${INTINCLS}
105 volint.ss.o: volint.ss.c ${INTINCLS}
106 volint.xdr.o: volint.xdr.c ${INTINCLS}
107 vsutils.o: vsutils.c ${VINCLS} ${RINCLS} ${INTINCLS}
108 volmain.o: volmain.c ${VINCLS} ${RINCLS} AFS_component_version_number.c
109 volprocs.o: volprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
110 dumpstuff.o: dumpstuff.c ${VINCLS} ${RINCLS} ${INTINCLS}
111 voldump.o: voldump.c ${VINCLS} ${RINCLS}
112 vos.o: vos.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
113 vsprocs.o: vsprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
114 physio.o: physio.c ${VINCLS}
115 common.o: common.c ${VINCLS}
116 lockprocs.o: lockprocs.c ${VINCLS} ${INTINCLS} ${RINCLS}
119 # Installation targets
122 ${DESTDIR}${sbindir}/restorevol \
123 ${DESTDIR}${sbindir}/voldump \
124 ${DESTDIR}${includedir}/afs/volser.h \
125 ${DESTDIR}${includedir}/afs/volint.h \
126 ${DESTDIR}${sbindir}/vos \
127 ${DESTDIR}${afssrvsbindir}/vos \
128 ${DESTDIR}${afssrvlibexecdir}/volserver \
129 ${DESTDIR}${libdir}/afs/libvolser.a
132 ${DEST}/include/afs/volser.h: volser.h
135 ${DEST}/include/afs/volint.h: volint.h
138 ${DEST}/etc/restorevol: restorevol
141 ${DEST}/etc/voldump: voldump
144 ${DEST}/etc/vos ${DEST}/root.server/usr/afs/bin/vos: vos
147 ${DEST}/lib/afs/libvolser.a: libvolser.a
150 ${DEST}/root.server/usr/afs/bin/volserver: volserver
151 @case ${SYS_NAME} in \
152 alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
153 echo "Don't install volserver for ${SYS_NAME}" ;; \
154 *_darwin_[1-6][0-9]) \
155 echo ${INSTALL} -ns $? $@ ; \
156 ${INSTALL} -ns $? $@ ;; \
158 echo "Don't install volserver for ${SYS_NAME}" ;; \
160 echo ${INSTALL} -ns $? $@ ; \
161 ${INSTALL} -ns $? $@ ;; \
168 $(RM) -f *.o *.a core volserver volint.ss.c volint.cs.c volint.h \
169 volint.xdr.c vos volser.h volerr.c AFS_component_version_number.c restorevol voldump
171 include ../config/Makefile.version
173 ${DESTDIR}${sbindir}/restorevol: restorevol
176 ${DESTDIR}${sbindir}/voldump: voldump
179 ${DESTDIR}${includedir}/afs/volser.h: volser.h
182 ${TOP_INCDIR}/afs/volser.h: volser.h
185 ${DESTDIR}${includedir}/afs/volint.h: volint.h
188 ${TOP_INCDIR}/afs/volint.h: volint.h
191 ${DESTDIR}${sbindir}/vos: vos
194 ${DESTDIR}${afssrvsbindir}/vos: vos
197 ${DESTDIR}${afssrvlibexecdir}/volserver: volserver
198 @case ${SYS_NAME} in \
199 alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \
200 echo "Don't install volserver for ${SYS_NAME}" ;; \
201 *_darwin_[1-6][0-9]) \
202 echo ${INSTALL} -ns $? $@ ; \
203 ${INSTALL} -ns $? $@ ;; \
205 echo "Don't install volserver for ${SYS_NAME}" ;; \
207 echo ${INSTALL} -ns $? $@ ; \
208 ${INSTALL} -ns $? $@ ;; \
211 ${DESTDIR}${libdir}/afs/libvolser.a: libvolser.a
214 ${TOP_LIBDIR}/libvolser.a: libvolser.a
218 ${DEST}/etc/restorevol \
219 ${DEST}/etc/voldump \
220 ${DEST}/include/afs/volser.h \
221 ${DEST}/include/afs/volint.h \
223 ${DEST}/root.server/usr/afs/bin/vos \
224 ${DEST}/root.server/usr/afs/bin/volserver \
225 ${DEST}/lib/afs/libvolser.a
229 sh $(HELPER_SPLINT) $(CFLAGS) \
231 vsprocs.c vsutils.c lockprocs.c volerr.c \
232 volmain.c volprocs.c physio.c common.c voltrans.c \