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 # Makefile for the module providing the client side of the File Server
9 # and Cache Manager extended statistics gathering.
12 include @TOP_OBJDIR@/src/config/Makefile.config
13 include @TOP_OBJDIR@/src/config/Makefile.lwp
16 INSTALL_DATA = @INSTALL_DATA@
17 INSTALL_PROGRAM = @INSTALL_PROGRAM@
18 INSTALL_SCRIPT = @INSTALL_SCRIPT@
20 RPCINCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/rx/rx.h
22 LIBS=${TOP_LIBDIR}/libafsint.a \
23 ${TOP_LIBDIR}/libcmd.a \
24 ${TOP_LIBDIR}/librx.a \
25 ${TOP_LIBDIR}/liblwp.a \
26 ${TOP_LIBDIR}/libsys.a \
30 ${TOP_INCDIR}/afs/xstat_fs.h \
31 ${TOP_INCDIR}/afs/xstat_cm.h \
32 ${TOP_LIBDIR}/libxstat_fs.a \
33 ${TOP_LIBDIR}/libxstat_cm.a \
37 ${TOP_INCDIR}/afs/xstat_fs.h: xstat_fs.h
40 ${TOP_INCDIR}/afs/xstat_cm.h: xstat_cm.h
43 ${TOP_LIBDIR}/libxstat_fs.a: libxstat_fs.a
46 ${TOP_LIBDIR}/libxstat_cm.a: libxstat_cm.a
50 # File Server data collection
52 FSINCLS=xstat_fs.h ${RPCINCLS}
54 libxstat_fs.a: xstat_fs.o xstat_fs_callback.o AFS_component_version_number.o
56 $(AR) crv $@ xstat_fs.o xstat_fs_callback.o AFS_component_version_number.o
59 xstat_fs.o: xstat_fs.c ${FSINCLS}
61 xstat_fs_callback.o: xstat_fs_callback.c ${FSINCLS}
63 xstat_fs_test.o: xstat_fs_test.c ${FSINCLS} AFS_component_version_number.c
65 xstat_fs_test: xstat_fs_test.o libxstat_fs.a ${LIBS}
66 $(AFS_LDRULE) xstat_fs_test.o libxstat_fs.a \
67 ${LIBS} $(LIB_roken) ${XLIBS}
70 # Cache Manager data collection
72 CMINCLS=xstat_cm.h ${RPCINCLS}
74 libxstat_cm.a: xstat_cm.o AFS_component_version_number.o
75 -$(RM) -f libxstat_cm.a
76 $(AR) crv libxstat_cm.a xstat_cm.o AFS_component_version_number.o
77 $(RANLIB) libxstat_cm.a
79 xstat_cm.o: xstat_cm.c ${CMINCLS}
81 xstat_cm_test.o: xstat_cm_test.c ${CMINCLS} AFS_component_version_number.c
83 xstat_cm_test: xstat_cm_test.o libxstat_cm.a ${LIBS}
84 $(AFS_LDRULE) xstat_cm_test.o libxstat_cm.a \
85 ${LIBS} $(LIB_roken) ${XLIBS}
88 # Installation targets
90 install: xstat_fs.h xstat_cm.h libxstat_fs.a libxstat_cm.a xstat_fs_test \
92 ${INSTALL} -d ${DESTDIR}${includedir}/afs
93 ${INSTALL} -d ${DESTDIR}${libdir}/afs
94 ${INSTALL} -d ${DESTDIR}${bindir}
95 ${INSTALL_DATA} ${srcdir}/xstat_fs.h ${DESTDIR}${includedir}/afs/xstat_fs.h
96 ${INSTALL_DATA} ${srcdir}/xstat_cm.h ${DESTDIR}${includedir}/afs/xstat_cm.h
97 ${INSTALL_DATA} libxstat_fs.a ${DESTDIR}${libdir}/afs/libxstat_fs.a
98 ${INSTALL_DATA} libxstat_cm.a ${DESTDIR}${libdir}/afs/libxstat_cm.a
99 ${INSTALL_PROGRAM} xstat_fs_test ${DESTDIR}${bindir}/xstat_fs_test
100 ${INSTALL_PROGRAM} xstat_cm_test ${DESTDIR}${bindir}/xstat_cm_test
102 dest: xstat_fs.h xstat_cm.h libxstat_fs.a libxstat_cm.a xstat_fs_test \
104 ${INSTALL} -d ${DEST}/include/afs
105 ${INSTALL} -d ${DEST}/lib/afs
106 ${INSTALL} -d ${DEST}/bin
107 ${INSTALL_DATA} ${srcdir}/xstat_fs.h ${DEST}/include/afs/xstat_fs.h
108 ${INSTALL_DATA} ${srcdir}/xstat_cm.h ${DEST}/include/afs/xstat_cm.h
109 ${INSTALL_DATA} libxstat_fs.a ${DEST}/lib/afs/libxstat_fs.a
110 ${INSTALL_DATA} libxstat_cm.a ${DEST}/lib/afs/libxstat_cm.a
111 ${INSTALL_PROGRAM} xstat_fs_test ${DEST}/bin/xstat_fs_test
112 ${INSTALL_PROGRAM} xstat_cm_test ${DEST}/bin/xstat_cm_test
118 $(RM) -f *.o *.a xstat_fs_test xstat_cm_test core AFS_component_version_number.c
120 include ../config/Makefile.version