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
8 # Portions Copyright (c) 2003 Apple Computer, Inc.
11 include @TOP_OBJDIR@
/src
/config
/Makefile.config
13 INSTALL_DATA
= @INSTALL_DATA@
14 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
15 INSTALL_SCRIPT
= @INSTALL_SCRIPT@
16 HELPER_SPLINT
=@HELPER_SPLINT@
19 LIBS
=${TOP_LIBDIR}/libcmd.a vlib.a
${TOP_LIBDIR}/util.a \
20 ${TOP_LIBDIR}/libdir.a
${TOP_LIBDIR}/librx.a \
21 ${TOP_LIBDIR}/liblwp.a
${TOP_LIBDIR}/libsys.a \
22 ${TOP_LIBDIR}/libacl.a
24 CFLAGS
= ${COMMON_CFLAGS} -D
${SYS_NAME} ${FSINCLUDES} ${XCFLAGS} ${ARCHFLAGS} -DFSSYNC_BUILD_SERVER
-DFSSYNC_BUILD_CLIENT
26 PUBLICHEADERS
=nfs.h vnode.h viceinode.h volume.h volume_inline.h voldefs.h partition.h \
27 fssync.h ihandle.h namei_ops.h salvsync.h daemon_com.h vnode_inline.h
29 VLIBOBJS
=vnode.o volume.o vutil.o partition.o fssync-server.o fssync-client.o \
30 clone.o nuke.o devname.o listinodes.o common.o ihandle.o purge.o \
31 namei_ops.o salvsync-server.o salvsync-client.o daemon_com.o
33 OBJECTS
=${VLIBOBJS} physio.o vol-salvage.o vol-info.o vol-dump.o vol-bless.o fssync-debug.o \
34 volinfo-main.o volscan-main.o
37 ${TOP_LIBDIR}/vlib.a \
38 ${TOP_LIBDIR}/libvlib.a \
44 ${TOP_INCDIR}/afs
/nfs.h \
45 ${TOP_INCDIR}/afs
/vnode.h \
46 ${TOP_INCDIR}/afs
/vnode_inline.h \
47 ${TOP_INCDIR}/afs
/viceinode.h \
48 ${TOP_INCDIR}/afs
/volume.h \
49 ${TOP_INCDIR}/afs
/volume_inline.h \
50 ${TOP_INCDIR}/afs
/voldefs.h \
51 ${TOP_INCDIR}/afs
/partition.h \
52 ${TOP_INCDIR}/afs
/fssync.h \
53 ${TOP_INCDIR}/afs
/salvsync.h \
54 ${TOP_INCDIR}/afs
/daemon_com.h \
55 ${TOP_INCDIR}/afs
/ihandle.h \
56 ${TOP_INCDIR}/afs
/namei_ops.h \
57 ${TOP_INCDIR}/afs
/vol_prototypes.h
59 ${TOP_LIBDIR}/vlib.a
: vlib.a
62 ${TOP_LIBDIR}/libvlib.a
: vlib.a
65 ${TOP_INCDIR}/afs
/nfs.h
: nfs.h
68 ${TOP_INCDIR}/afs
/vnode.h
: vnode.h
71 ${TOP_INCDIR}/afs
/vnode_inline.h
: vnode_inline.h
74 ${TOP_INCDIR}/afs
/viceinode.h
: viceinode.h
77 ${TOP_INCDIR}/afs
/volume.h
: volume.h
80 ${TOP_INCDIR}/afs
/volume_inline.h
: volume_inline.h
83 ${TOP_INCDIR}/afs
/voldefs.h
: voldefs.h
86 ${TOP_INCDIR}/afs
/partition.h
: partition.h
89 ${TOP_INCDIR}/afs
/fssync.h
: fssync.h
92 ${TOP_INCDIR}/afs
/salvsync.h
: salvsync.h
95 ${TOP_INCDIR}/afs
/daemon_com.h
: daemon_com.h
98 ${TOP_INCDIR}/afs
/ihandle.h
: ihandle.h
101 ${TOP_INCDIR}/afs
/namei_ops.h
: namei_ops.h
102 ${INSTALL_DATA} $?
$@
104 ${TOP_INCDIR}/afs
/salvage.h
: salvage.h
105 ${INSTALL_DATA} $?
$@
107 ${TOP_INCDIR}/afs
/vol-salvage.h
: vol-salvage.h
108 ${INSTALL_DATA} $?
$@
110 ${TOP_INCDIR}/afs
/vol_prototypes.h
: vol_prototypes.h
111 ${INSTALL_DATA} $?
$@
114 # Installation targets
116 install: vlib.a salvager volinfo volscan fssync-debug
117 ${INSTALL} -d
${DESTDIR}${libdir}/afs
118 ${INSTALL} -d
${DESTDIR}${afssrvlibexecdir}
119 ${INSTALL} -d
${DESTDIR}${afssrvsbindir}
120 ${INSTALL} -d
${DESTDIR}${includedir}/afs
121 ${INSTALL_DATA} vlib.a
${DESTDIR}${libdir}/afs
/vlib.a
122 ${INSTALL_DATA} vlib.a
${DESTDIR}${libdir}/afs
/libvlib.a
123 ${INSTALL_PROGRAM} salvager
${DESTDIR}${afssrvlibexecdir}/salvager
124 ${INSTALL_PROGRAM} volinfo
${DESTDIR}${afssrvsbindir}/volinfo
125 ${INSTALL_PROGRAM} volscan
${DESTDIR}${afssrvsbindir}/volscan
126 ${INSTALL_PROGRAM} fssync-debug
${DESTDIR}${afssrvsbindir}/fssync-debug
127 ${INSTALL_DATA} ${srcdir}/nfs.h
${DESTDIR}${includedir}/afs
/nfs.h
128 ${INSTALL_DATA} ${srcdir}/vnode.h
${DESTDIR}${includedir}/afs
/vnode.h
129 ${INSTALL_DATA} ${srcdir}/vnode_inline.h
${DESTDIR}${includedir}/afs
/vnode_inline.h
130 ${INSTALL_DATA} ${srcdir}/viceinode.h
${DESTDIR}${includedir}/afs
/viceinode.h
131 ${INSTALL_DATA} ${srcdir}/volume.h
${DESTDIR}${includedir}/afs
/volume.h
132 ${INSTALL_DATA} ${srcdir}/volume_inline.h
${DESTDIR}${includedir}/afs
/volume_inline.h
133 ${INSTALL_DATA} ${srcdir}/voldefs.h
${DESTDIR}${includedir}/afs
/voldefs.h
134 ${INSTALL_DATA} ${srcdir}/partition.h
${DESTDIR}${includedir}/afs
/partition.h
135 ${INSTALL_DATA} ${srcdir}/fssync.h
${DESTDIR}${includedir}/afs
/fssync.h
136 ${INSTALL_DATA} ${srcdir}/salvsync.h
${DESTDIR}${includedir}/afs
/salvsync.h
137 ${INSTALL_DATA} ${srcdir}/daemon_com.h
${DESTDIR}${includedir}/afs
/daemon_com.h
138 ${INSTALL_DATA} ${srcdir}/ihandle.h
${DESTDIR}${includedir}/afs
/ihandle.h
139 ${INSTALL_DATA} ${srcdir}/namei_ops.h
${DESTDIR}${includedir}/afs
/namei_ops.h
140 set
-x
; if
test x
"$(install_XFS_SIZE_CHECK)" != x
"" ; then \
141 ${INSTALL_PROGRAM} xfs_size_check \
142 ${DESTDIR}${afssrvsbindir}/xfs_size_check
; \
145 dest
: vlib.a salvager volinfo volscan fssync-debug
146 ${INSTALL} -d
${DEST}/lib
/afs
147 ${INSTALL} -d
${DEST}/root.server
/usr
/afs
/bin
148 ${INSTALL} -d
${DEST}/include/afs
149 ${INSTALL_DATA} vlib.a
${DEST}/lib
/afs
/vlib.a
150 ${INSTALL_DATA} vlib.a
${DEST}/lib
/afs
/libvlib.a
151 ${INSTALL_PROGRAM} salvager
${DEST}/root.server
/usr
/afs
/bin
/salvager
152 ${INSTALL_PROGRAM} volinfo
${DEST}/root.server
/usr
/afs
/bin
/volinfo
153 ${INSTALL_PROGRAM} volscan
${DEST}/root.server
/usr
/afs
/bin
/volscan
154 ${INSTALL_PROGRAM} fssync-debug
${DEST}/root.server
/usr
/afs
/bin
/fssync-debug
155 ${INSTALL_DATA} ${srcdir}/nfs.h
${DEST}/include/afs
/nfs.h
156 ${INSTALL_DATA} ${srcdir}/vnode.h
${DEST}/include/afs
/vnode.h
157 ${INSTALL_DATA} ${srcdir}/vnode_inline.h
${DEST}/include/afs
/vnode_inline.h
158 ${INSTALL_DATA} ${srcdir}/viceinode.h
${DEST}/include/afs
/viceinode.h
159 ${INSTALL_DATA} ${srcdir}/volume.h
${DEST}/include/afs
/volume.h
160 ${INSTALL_DATA} ${srcdir}/volume_inline.h
${DEST}/include/afs
/volume_inline.h
161 ${INSTALL_DATA} ${srcdir}/voldefs.h
${DEST}/include/afs
/voldefs.h
162 ${INSTALL_DATA} ${srcdir}/partition.h
${DEST}/include/afs
/partition.h
163 ${INSTALL_DATA} ${srcdir}/fssync.h
${DEST}/include/afs
/fssync.h
164 ${INSTALL_DATA} ${srcdir}/salvsync.h
${DEST}/include/afs
/salvsync.h
165 ${INSTALL_DATA} ${srcdir}/daemon_com.h
${DEST}/include/afs
/daemon_com.h
166 ${INSTALL_DATA} ${srcdir}/ihandle.h
${DEST}/include/afs
/ihandle.h
167 ${INSTALL_DATA} ${srcdir}/namei_ops.h
${DEST}/include/afs
/namei_ops.h
168 set
-x
; if
test x
"$(install_XFS_SIZE_CHECK)" != x
"" ; then \
169 ${INSTALL_PROGRAM} xfs_size_check \
170 $(DEST
)/root.server
/usr
/afs
/bin
/xfs_size_check
; \
176 ${OBJECTS}: ${PUBLICHEADERS} ${TOP_INCDIR}/lwp.h
${TOP_INCDIR}/lock.h
${TOP_INCDIR}/afs
/afsint.h vutils.h salvage.h AFS_component_version_number.c
178 vol-salvage.o vutil.o
: volinodes.h
179 vol-salvage.o salvager.o
: vol-salvage.h
180 vol-salvage.o
: salvsync.h daemon_com.h
182 salvager.o
: salvager.c
183 $(CC
) $(CFLAGS
) -c
${srcdir}/salvager.c
185 vlib.a
: ${VLIBOBJS} AFS_component_version_number.o
187 $(AR
) crv
$@
${VLIBOBJS} AFS_component_version_number.o
190 # new salvager: remove references to /vice by linking with novice.o
191 salvager
: vol-salvage.o physio.o vlib.a salvager.o
${LIBS}
192 ${CC} ${LDFLAGS} -o salvager vol-salvage.o physio.o salvager.o
${LIBS} ${XLIBS}
194 salvager.o
: AFS_component_version_number.c
196 vol-salvage
: vol-salvage.o
197 vol-info
: vol-info.o physio.o ihandle.o
199 listinodes.o
: listinodes.c AFS_component_version_number.c
200 case
${SYS_NAME} in \
201 hp?
00_ux101 | hp_ux10?
) \
202 ${CC} ${CFLAGS} -D_FILE64
-c
${srcdir}/listinodes.c \
205 ${CC} ${CFLAGS} -D_FILE_OFFSET_BITS
=64 -c
${srcdir}/listinodes.c \
207 * ) ${CC} ${CFLAGS} -c
${srcdir}/listinodes.c \
211 gi
: ${TOP_LIBDIR}/libsys.a
212 case
${SYS_NAME} in \
213 *linux
* | sgi_
* |
*fbsd
* ) \
214 echo
"Don't build gi on ${SYS_NAME}";; \
216 ${CC} ${CFLAGS} -c
${srcdir}/gi.c
; \
217 ${CC} ${LDFLAGS} -o gi gi.o
${TOP_LIBDIR}/libsys.a
;; \
220 namei_map
: ${TOP_LIBDIR}/libsys.a namei_map.o
221 ${CC} ${CFLAGS} -o namei_map namei_map.o
${TOP_LIBDIR}/libafsutil.a
${LIBS} ${XLIBS}
223 volinfo
: volinfo-main.o vol-info.o physio.o ihandle.o
${LIBS}
224 ${CC} ${CFLAGS} -o volinfo volinfo-main.o vol-info.o physio.o \
225 ihandle.o
${LIBS} ${XLIBS}
227 volscan
: volscan-main.o vol-info.o physio.o ihandle.o
${LIBS}
228 ${CC} ${CFLAGS} -o volscan volscan-main.o vol-info.o physio.o \
229 ihandle.o
${LIBS} ${XLIBS}
231 fssync-debug
: fssync-debug.o physio.o AFS_component_version_number.c
${LIBS}
232 ${CC} ${LDFLAGS} -o fssync-debug fssync-debug.o physio.o
${LIBS} ${XLIBS}
234 vol-bless
: vol-bless.o physio.o ihandle.o
${LIBS}
235 ${CC} ${CFLAGS} -o vol-bless vol-bless.o physio.o
${LIBS} ${XLIBS}
237 xfs_size_check
: xfs_size_check.c
238 ${CC} ${CFLAGS} -o xfs_size_check
${srcdir}/xfs_size_check.c
244 $(RM
) -f
*.o
*.a AFS_component_version_number.c
245 $(RM
) -f
${SCMPROGS} ${STAGEPROGS} core salvager volinfo volscan gi fssync-debug
250 include ..
/config
/Makefile.version
253 sh
$(HELPER_SPLINT
) $(CFLAGS
) \
254 vnode.c volume.c vutil.c partition.c fssync-server.c fssync-client.c \
255 clone.c nuke.c devname.c listinodes.c common.c ihandle.c \
256 namei_ops.c salvsync-server.c salvsync-client.c daemon_com.c purge.c \
257 physio.c vol-salvage.c vol-info.c vol-bless.c fssync-debug.c \
258 volinfo-main.c volscan-main.c