logging-changes-for-large-files-20030619
[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
11 VINCLS=${TOP_INCDIR}/afs/partition.h ${TOP_INCDIR}/afs/volume.h \
12         ${TOP_INCDIR}/afs/vlserver.h vol.h dump.h volser.h  lockdata.h
13
14 RINCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
15        ${TOP_INCDIR}/afs/keys.h ${TOP_INCDIR}/afs/cellconfig.h \
16         ${TOP_INCDIR}/ubik.h ${TOP_INCDIR}/afs/cmd.h
17
18 INTINCLS=volint.h volser.h 
19
20 LIBS=\
21         ${TOP_LIBDIR}/libaudit.a \
22         ${TOP_LIBDIR}/vlib.a \
23         ${TOP_LIBDIR}/libacl.a \
24         ${TOP_LIBDIR}/libsys.a \
25         ${TOP_LIBDIR}/libvldb.a \
26         ${TOP_LIBDIR}/libubik.a \
27         ${TOP_LIBDIR}/libauth.a \
28         ${TOP_LIBDIR}/libcmd.a \
29         ${TOP_LIBDIR}/librxkad.a \
30         ${TOP_LIBDIR}/libdes.a \
31         ${TOP_LIBDIR}/librxstat.a \
32         ${TOP_LIBDIR}/librx.a \
33         ${TOP_LIBDIR}/liblwp.a \
34         ${TOP_LIBDIR}/libsys.a \
35         ${TOP_LIBDIR}/libcom_err.a \
36         ${TOP_LIBDIR}/libkauth.a \
37         ${TOP_LIBDIR}/libusd.a \
38         ${TOP_LIBDIR}/util.a
39
40 VSOBJS=vsprocs.o vsutils.o lockprocs.o volint.xdr.o volerr.o 
41 SOBJS=volmain.o volprocs.o physio.o common.o voltrans.o volerr.o \
42  volint.cs.o dumpstuff.o volint.ss.o volint.xdr.o
43
44 all: volserver vos restorevol \
45         ${TOP_INCDIR}/afs/volser.h \
46         ${TOP_INCDIR}/afs/volint.h \
47         ${TOP_LIBDIR}/libvolser.a
48
49 restorevol: restorevol.c
50         ${CC} ${CFLAGS} -o restorevol ${srcdir}/restorevol.c \
51                 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a
52
53 vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
54         ${CC} ${LDFLAGS} -o vos vos.o $(VSOBJS) libvolser.a ${LIBS} ${XLIBS}
55
56 volserver: $(SOBJS) $(LIBS) ${TOP_LIBDIR}/libdir.a
57         ${CC} ${DBUG} -o volserver $(SOBJS) ${TOP_LIBDIR}/libdir.a \
58                 ${LDFLAGS} $(LIBS) ${XLIBS}
59
60 libvolser.a: volint.cs.o  $(VSOBJS) volint.ss.o AFS_component_version_number.o
61         -$(RM) -f $@
62         $(AR) crv $@ volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o 
63         $(RANLIB) $@
64
65 volser.h volerr.c: volerr.et volser.p.h
66         $(RM) -f volser.h volerr.c
67         ${COMPILE_ET} -p ${srcdir} volerr -h volser
68
69 volint.cs.c: volint.xg
70         ${RXGEN} -x -C -o $@ ${srcdir}/volint.xg
71
72 volint.ss.c: volint.xg
73         ${RXGEN} -x -S -o $@ ${srcdir}/volint.xg
74
75 volint.xdr.c: volint.xg
76         ${RXGEN} -x -c -o $@ ${srcdir}/volint.xg
77
78 volint.h: volint.xg
79         ${RXGEN} -x -h -o $@ ${srcdir}/volint.xg
80
81 volint.cs.c: volint.h
82 volint.ss.c: volint.h
83 volint.xdr.c: volint.h
84
85 #
86 # Dependencies
87 #
88 volint.cs.o: volint.cs.c ${INTINCLS}
89 volint.ss.o: volint.ss.c ${INTINCLS}
90 volint.xdr.o: volint.xdr.c ${INTINCLS}
91 vsutils.o: vsutils.c ${VINCLS} ${RINCLS} ${INTINCLS}
92 volmain.o: volmain.c ${VINCLS} ${RINCLS} AFS_component_version_number.c
93 volprocs.o: volprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
94 dumpstuff.o: dumpstuff.c ${VINCLS} ${RINCLS} ${INTINCLS}
95 voldump.o: voldump.c ${VINCLS} ${RINCLS}
96 vos.o: vos.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
97 vsprocs.o: vsprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
98 physio.o: physio.c ${VINCLS}
99 common.o: common.c ${VINCLS}
100 lockprocs.o: lockprocs.c ${VINCLS} ${INTINCLS} ${RINCLS}
101
102 #
103 # Installation targets
104 #
105 install: \
106         ${DESTDIR}${sbindir}/restorevol \
107         ${DESTDIR}${includedir}/afs/volser.h \
108         ${DESTDIR}${includedir}/afs/volint.h \
109         ${DESTDIR}${sbindir}/vos \
110         ${DESTDIR}${afssrvsbindir}/vos \
111         ${DESTDIR}${afssrvlibexecdir}/volserver \
112         ${DESTDIR}${libdir}/afs/libvolser.a
113
114
115 ${DEST}/include/afs/volser.h: volser.h
116         ${INSTALL} $? $@
117
118 ${DEST}/include/afs/volint.h: volint.h
119         ${INSTALL} $? $@
120
121 ${DEST}/etc/restorevol: restorevol
122         ${INSTALL} $? $@
123
124 ${DEST}/etc/vos ${DEST}/root.server/usr/afs/bin/vos: vos
125         ${INSTALL} $? $@
126
127 ${DEST}/lib/afs/libvolser.a: libvolser.a
128         ${INSTALL} $? $@
129
130 ${DEST}/root.server/usr/afs/bin/volserver: volserver
131         ${INSTALL} $? $@
132
133 #
134 # Misc targets
135
136 clean:
137         $(RM) -f *.o *.a core volserver volint.ss.c volint.cs.c volint.h \
138         volint.xdr.c vos volser.h volerr.c AFS_component_version_number.c restorevol
139
140 include ../config/Makefile.version
141
142 ${DESTDIR}${sbindir}/restorevol: restorevol
143         ${INSTALL} $? $@
144
145 ${DESTDIR}${includedir}/afs/volser.h: volser.h
146         ${INSTALL} $? $@
147
148 ${TOP_INCDIR}/afs/volser.h: volser.h
149         ${INSTALL} $? $@
150
151 ${DESTDIR}${includedir}/afs/volint.h: volint.h
152         ${INSTALL} $? $@
153
154 ${TOP_INCDIR}/afs/volint.h: volint.h
155         ${INSTALL} $? $@
156
157 ${DESTDIR}${sbindir}/vos: vos
158         ${INSTALL} $? $@
159
160 ${DESTDIR}${afssrvsbindir}/vos: vos
161         ${INSTALL} $? $@
162
163 ${DESTDIR}${afssrvlibexecdir}/volserver: volserver
164         ${INSTALL} $? $@
165
166 ${DESTDIR}${libdir}/afs/libvolser.a: libvolser.a
167         ${INSTALL} $? $@
168
169 ${TOP_LIBDIR}/libvolser.a: libvolser.a
170         ${INSTALL} $? $@
171
172 dest: \
173         ${DEST}/etc/restorevol \
174         ${DEST}/include/afs/volser.h \
175         ${DEST}/include/afs/volint.h \
176         ${DEST}/etc/vos \
177         ${DEST}/root.server/usr/afs/bin/vos \
178         ${DEST}/root.server/usr/afs/bin/volserver \
179         ${DEST}/lib/afs/libvolser.a
180
181
182 splint::
183         splint $(CFLAGS) \
184             vos.c restorevol.c \
185             vsprocs.c vsutils.c lockprocs.c volerr.c \
186             volmain.c volprocs.c physio.c common.c voltrans.c \
187             dumpstuff.c