DEVEL15-autoconf-strip-debug-options-sanity-20071112
[openafs.git] / src / vol / 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 # Portions Copyright (c) 2003 Apple Computer, Inc.
9
10 srcdir=@srcdir@
11 include @TOP_OBJDIR@/src/config/Makefile.config
12 HELPER_SPLINT=@HELPER_SPLINT@
13
14
15 LIBS=${TOP_LIBDIR}/libcmd.a vlib.a ${TOP_LIBDIR}/util.a \
16         ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdir.a \
17         ${TOP_LIBDIR}/liblwp.a  ${TOP_LIBDIR}/libacl.a
18
19 CFLAGS = ${COMMON_CFLAGS} -D${SYS_NAME} ${FSINCLUDES} ${XCFLAGS} ${ARCHFLAGS} -DFSSYNC_BUILD_SERVER -DFSSYNC_BUILD_CLIENT
20
21 PUBLICHEADERS=nfs.h vnode.h viceinode.h volume.h voldefs.h partition.h \
22         fssync.h ihandle.h namei_ops.h salvsync.h daemon_com.h
23
24 VLIBOBJS=vnode.o volume.o vutil.o partition.o fssync-server.o fssync-client.o \
25          clone.o nuke.o devname.o listinodes.o common.o ihandle.o purge.o \
26          namei_ops.o salvsync-server.o salvsync-client.o daemon_com.o
27
28 OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o vol-dump.o vol-bless.o fssync-debug.o
29
30 all: gi \
31         ${TOP_LIBDIR}/vlib.a \
32         ${TOP_LIBDIR}/libvlib.a \
33         salvager \
34         volinfo \
35         fssync-debug \
36         $(FS_CONV_OSF40D) \
37         $(XFS_SIZE_CHECK) \
38         $(FS_CONV_SOL26) \
39         ${TOP_INCDIR}/afs/nfs.h \
40         ${TOP_INCDIR}/afs/vnode.h \
41         ${TOP_INCDIR}/afs/viceinode.h \
42         ${TOP_INCDIR}/afs/volume.h \
43         ${TOP_INCDIR}/afs/voldefs.h \
44         ${TOP_INCDIR}/afs/partition.h \
45         ${TOP_INCDIR}/afs/fssync.h \
46         ${TOP_INCDIR}/afs/salvsync.h \
47         ${TOP_INCDIR}/afs/daemon_com.h \
48         ${TOP_INCDIR}/afs/ihandle.h \
49         ${TOP_INCDIR}/afs/namei_ops.h
50
51 #
52 # Installation targets
53 #
54 install: \
55         ${DESTDIR}${libdir}/afs/vlib.a \
56         ${DESTDIR}${libdir}/afs/libvlib.a \
57         ${DESTDIR}${afssrvlibexecdir}/salvager \
58         ${DESTDIR}${afssrvsbindir}/volinfo \
59         ${DESTDIR}${afssrvsbindir}/fssync-debug \
60         $(install_FS_CONV_OSF40D) \
61         $(install_XFS_SIZE_CHECK) \
62         $(install_FS_CONV_SOL26) \
63         ${DESTDIR}${includedir}/afs/nfs.h \
64         ${DESTDIR}${includedir}/afs/vnode.h \
65         ${DESTDIR}${includedir}/afs/viceinode.h \
66         ${DESTDIR}${includedir}/afs/volume.h \
67         ${DESTDIR}${includedir}/afs/voldefs.h \
68         ${DESTDIR}${includedir}/afs/partition.h \
69         ${DESTDIR}${includedir}/afs/fssync.h \
70         ${DESTDIR}${includedir}/afs/salvsync.h \
71         ${DESTDIR}${includedir}/afs/daemon_com.h \
72         ${DESTDIR}${includedir}/afs/ihandle.h \
73         ${DESTDIR}${includedir}/afs/namei_ops.h
74
75 ${DEST}/root.server/usr/afs/bin/salvager: salvager 
76         ${INSTALL} $? $@
77
78 ${DEST}/root.server/usr/afs/bin/volinfo: volinfo
79         ${INSTALL} $? $@
80
81 ${DEST}/root.server/usr/afs/bin/fssync-debug: fssync-debug
82         if test "@DEMAND_ATTACH@" = "no"; then \
83                 ${INSTALL} $? $@ ; \
84         fi
85
86 ${DEST}/lib/afs/vlib.a: vlib.a
87         ${INSTALL} $? $@
88
89 ${DEST}/lib/afs/libvlib.a: vlib.a
90         ${INSTALL} $? $@
91
92 ${DESTDIR}${afssrvsbindir}/fs_conv_dux40D:  fs_conv_dux40D
93         ${INSTALL} $? $@
94
95 ${DESTDIR}${afssrvsbindir}/xfs_size_check:  xfs_size_check
96         ${INSTALL} $? $@
97
98 ${DESTDIR}${afssrvsbindir}/fs_conv_sol26:  fs_conv_sol26
99         ${INSTALL} $? $@
100
101 $(DEST)/root.server/usr/afs/bin/fs_conv_dux40D:  fs_conv_dux40D
102         ${INSTALL} $? $@
103
104 $(DEST)/root.server/usr/afs/bin/xfs_size_check:  xfs_size_check
105         ${INSTALL} $? $@
106
107 $(DEST)/root.server/usr/afs/bin/fs_conv_sol26:  fs_conv_sol26
108         ${INSTALL} $? $@
109
110 ${DEST}/include/afs/nfs.h: nfs.h
111         ${INSTALL} $? $@
112
113 ${DEST}/include/afs/vnode.h: vnode.h
114         ${INSTALL} $? $@
115
116 ${DEST}/include/afs/viceinode.h: viceinode.h
117         ${INSTALL} $? $@
118
119 ${DEST}/include/afs/volume.h: volume.h
120         ${INSTALL} $? $@
121
122 ${DEST}/include/afs/voldefs.h: voldefs.h
123         ${INSTALL} $? $@
124
125 ${DEST}/include/afs/partition.h: partition.h
126         ${INSTALL} $? $@
127
128 ${DEST}/include/afs/fssync.h: fssync.h
129         ${INSTALL} $? $@
130
131 ${DEST}/include/afs/salvsync.h: salvsync.h
132         ${INSTALL} $? $@
133
134 ${DEST}/include/afs/daemon_com.h: daemon_com.h
135         ${INSTALL} $? $@
136
137 ${DEST}/include/afs/ihandle.h: ihandle.h
138         ${INSTALL} $? $@
139
140 ${DEST}/include/afs/namei_ops.h: namei_ops.h
141         ${INSTALL} $? $@
142
143 #
144 # Build targets
145 #
146 ${OBJECTS}: ${PUBLICHEADERS} ${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h ${TOP_INCDIR}/afs/afsint.h vutils.h salvage.h AFS_component_version_number.c
147
148 vol-salvage.o vutil.o: volinodes.h
149 vol-salvage.o salvager.o: vol-salvage.h
150 vol-salvage.o: salvsync.h daemon_com.h
151
152 vlib.a: ${VLIBOBJS} AFS_component_version_number.o
153         $(RM) -f $@
154         $(AR) crv $@ ${VLIBOBJS} AFS_component_version_number.o
155         $(RANLIB) $@
156
157 # new salvager:  remove references to /vice by linking with novice.o
158 salvager: vol-salvage.o physio.o vlib.a salvager.o ${LIBS}
159         ${CC} ${LDFLAGS} -o salvager vol-salvage.o physio.o salvager.o ${LIBS} ${XLIBS}
160
161 vol-salvage: vol-salvage.o
162 vol-info: vol-info.o physio.o ihandle.o
163
164 listinodes.o: listinodes.c AFS_component_version_number.c
165         case ${SYS_NAME} in                             \
166                 hp?00_ux101 | hp_ux10? )                \
167                         ${CC} ${CFLAGS} -D_FILE64 -c ${srcdir}/listinodes.c \
168                                 ;;                      \
169                 hp_ux11* )              \
170                         ${CC} ${CFLAGS} -D_FILE_OFFSET_BITS=64 -c ${srcdir}/listinodes.c \
171                                 ;;                      \
172                 * )     ${CC} ${CFLAGS} -c ${srcdir}/listinodes.c \
173                                 ;;                      \
174         esac
175
176 gi: ${TOP_LIBDIR}/libsys.a 
177         case ${SYS_NAME} in \
178                 *linux* | sgi_* | *fbsd* ) \
179                         echo "Don't build gi on ${SYS_NAME}";; \
180                 *) \
181                         ${CC} ${CFLAGS} -c ${srcdir}/gi.c ; \
182                         ${CC} ${LDFLAGS} -o gi gi.o ${TOP_LIBDIR}/libsys.a;; \
183         esac
184
185 namei_map: ${TOP_LIBDIR}/libsys.a namei_map.o
186         ${CC} ${CFLAGS} -o namei_map namei_map.o ${TOP_LIBDIR}/libafsutil.a ${LIBS} ${XLIBS}
187
188 volinfo: vol-info.o physio.o ihandle.o ${LIBS}
189         ${CC} ${CFLAGS} -o volinfo vol-info.o physio.o \
190                 ihandle.o ${LIBS} ${XLIBS}
191
192 fssync-debug: fssync-debug.o physio.o AFS_component_version_number.c ${LIBS}
193         ${CC} ${LDFLAGS} -o fssync-debug fssync-debug.o physio.o ${LIBS} ${XLIBS}
194
195 vol-bless: vol-bless.o physio.o ihandle.o ${LIBS}
196         ${CC} ${CFLAGS} -o vol-bless vol-bless.o physio.o ${LIBS} ${XLIBS}
197
198 fs_conv_dux40D: fs_conv_411.o ${LIBS}
199         ${CC} ${CFLAGS} ${TOP_LIBDIR}/libcmd.a -o fs_conv_dux40D fs_conv_411.o  ${LIBS} ${XLIBS}
200
201 fs_conv_sol26: fs_conv_411.o ${LIBS}
202         ${CC} ${CFLAGS} ${TOP_LIBDIR}/libcmd.a -o fs_conv_sol26 fs_conv_411.o  ${LIBS} ${XLIBS}
203
204 fs_conv_411.o: fs_conv_411.c AFS_component_version_number.c
205         ${CC} ${CFLAGS} -c ${srcdir}/fs_conv_411.c
206
207 xfs_size_check: xfs_size_check.c
208         ${CC} ${CFLAGS} -o xfs_size_check ${srcdir}/xfs_size_check.c
209
210 #
211 # Misc. targets
212 #
213 clean:
214         $(RM) -f *.o *.a AFS_component_version_number.c
215         $(RM) -f ${SCMPROGS} ${STAGEPROGS} core salvager volinfo gi fs_conv_sol26 fs_conv_dux40D
216
217 test:
218         cd test; $(MAKE)
219
220 include ../config/Makefile.version
221 ${DESTDIR}${libdir}/afs/vlib.a: vlib.a
222         ${INSTALL} $? $@
223
224 ${TOP_LIBDIR}/vlib.a: vlib.a
225         ${INSTALL} $? $@
226
227 ${DESTDIR}${libdir}/afs/libvlib.a: vlib.a
228         ${INSTALL} $? $@
229
230 ${TOP_LIBDIR}/libvlib.a: vlib.a
231         ${INSTALL} $? $@
232
233 ${DESTDIR}${afssrvlibexecdir}/salvager: salvager
234         ${INSTALL} $? $@
235
236 ${DESTDIR}${afssrvsbindir}/volinfo: volinfo
237         ${INSTALL} $? $@
238
239 ${DESTDIR}${afssrvsbindir}/fssync-debug: fssync-debug
240         if test "@DEMAND_ATTACH@" = "no" ; then \
241                 ${INSTALL} $? $@ ; \
242         fi
243
244 ${DESTDIR}${includedir}/afs/nfs.h: nfs.h
245         ${INSTALL} $? $@
246
247 ${TOP_INCDIR}/afs/nfs.h: nfs.h
248         ${INSTALL} $? $@
249
250 ${DESTDIR}${includedir}/afs/vnode.h: vnode.h
251         ${INSTALL} $? $@
252
253 ${TOP_INCDIR}/afs/vnode.h: vnode.h
254         ${INSTALL} $? $@
255
256 ${DESTDIR}${includedir}/afs/viceinode.h: viceinode.h
257         ${INSTALL} $? $@
258
259 ${TOP_INCDIR}/afs/viceinode.h: viceinode.h
260         ${INSTALL} $? $@
261
262 ${DESTDIR}${includedir}/afs/volume.h: volume.h
263         ${INSTALL} $? $@
264
265 ${TOP_INCDIR}/afs/volume.h: volume.h
266         ${INSTALL} $? $@
267
268 ${DESTDIR}${includedir}/afs/voldefs.h: voldefs.h
269         ${INSTALL} $? $@
270
271 ${TOP_INCDIR}/afs/voldefs.h: voldefs.h
272         ${INSTALL} $? $@
273
274 ${DESTDIR}${includedir}/afs/partition.h: partition.h
275         ${INSTALL} $? $@
276
277 ${TOP_INCDIR}/afs/partition.h: partition.h
278         ${INSTALL} $? $@
279
280 ${DESTDIR}${includedir}/afs/fssync.h: fssync.h
281         ${INSTALL} $? $@
282
283 ${TOP_INCDIR}/afs/fssync.h: fssync.h
284         ${INSTALL} $? $@
285
286 ${DESTDIR}${includedir}/afs/salvsync.h: salvsync.h
287         ${INSTALL} $? $@
288
289 ${TOP_INCDIR}/afs/salvsync.h: salvsync.h
290         ${INSTALL} $? $@
291
292 ${DESTDIR}${includedir}/afs/daemon_com.h: daemon_com.h
293         ${INSTALL} $? $@
294
295 ${TOP_INCDIR}/afs/daemon_com.h: daemon_com.h
296         ${INSTALL} $? $@
297
298 ${DESTDIR}${includedir}/afs/ihandle.h: ihandle.h
299         ${INSTALL} $? $@
300
301 ${TOP_INCDIR}/afs/ihandle.h: ihandle.h
302         ${INSTALL} $? $@
303
304 ${DESTDIR}${includedir}/afs/namei_ops.h: namei_ops.h
305         ${INSTALL} $? $@
306
307 ${TOP_INCDIR}/afs/namei_ops.h: namei_ops.h
308         ${INSTALL} $? $@
309
310 ${DESTDIR}${includedir}/afs/salvage.h: salvage.h
311         ${INSTALL} $? $@
312
313 ${TOP_INCDIR}/afs/salvage.h: salvage.h
314         ${INSTALL} $? $@
315
316 ${DESTDIR}${includedir}/afs/vol-salvage.h: vol-salvage.h
317         ${INSTALL} $? $@
318
319 ${TOP_INCDIR}/afs/vol-salvage.h: vol-salvage.h
320         ${INSTALL} $? $@
321
322 dest: \
323         ${DEST}/lib/afs/vlib.a \
324         ${DEST}/lib/afs/libvlib.a \
325         ${DEST}/root.server/usr/afs/bin/salvager \
326         ${DEST}/root.server/usr/afs/bin/volinfo \
327         ${DEST}/root.server/usr/afs/bin/fssync-debug \
328         $(dest_FS_CONV_OSF40D) \
329         $(dest_XFS_SIZE_CHECK) \
330         $(dest_FS_CONV_SOL26) \
331         ${DEST}/include/afs/nfs.h \
332         ${DEST}/include/afs/vnode.h \
333         ${DEST}/include/afs/viceinode.h \
334         ${DEST}/include/afs/volume.h \
335         ${DEST}/include/afs/voldefs.h \
336         ${DEST}/include/afs/partition.h \
337         ${DEST}/include/afs/fssync.h \
338         ${DEST}/include/afs/salvsync.h \
339         ${DEST}/include/afs/daemon_com.h \
340         ${DEST}/include/afs/ihandle.h \
341         ${DEST}/include/afs/namei_ops.h
342
343 check-splint::
344         sh $(HELPER_SPLINT) $(CFLAGS) \
345             vnode.c volume.c vutil.c partition.c fssync-server.c fssync-client.c \
346             clone.c nuke.c devname.c listinodes.c common.c ihandle.c \
347             namei_ops.c salvsync-server.c salvsync-client.c daemon_com.c purge.c \
348             physio.c vol-salvage.c vol-info.c vol-bless.c fssync-debug.c