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 RPCINCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/rx/rx.h
18 LIBS=${TOP_LIBDIR}/libafsint.a \
19 ${TOP_LIBDIR}/libcmd.a \
20 ${TOP_LIBDIR}/librx.a \
21 ${TOP_LIBDIR}/liblwp.a \
22 ${TOP_LIBDIR}/libsys.a \
23 ${TOP_LIBDIR}/libopr.a \
27 ${TOP_INCDIR}/afs/xstat_fs.h \
28 ${TOP_INCDIR}/afs/xstat_cm.h \
29 ${TOP_LIBDIR}/libxstat_fs.a \
30 ${TOP_LIBDIR}/libxstat_cm.a \
34 ${TOP_INCDIR}/afs/xstat_fs.h: xstat_fs.h
37 ${TOP_INCDIR}/afs/xstat_cm.h: xstat_cm.h
40 ${TOP_LIBDIR}/libxstat_fs.a: libxstat_fs.a
43 ${TOP_LIBDIR}/libxstat_cm.a: libxstat_cm.a
47 # File Server data collection
49 FSINCLS=xstat_fs.h ${RPCINCLS}
51 libxstat_fs.a: xstat_fs.o xstat_fs_callback.o AFS_component_version_number.o
53 $(AR) crv $@ xstat_fs.o xstat_fs_callback.o AFS_component_version_number.o
56 xstat_fs.o: xstat_fs.c ${FSINCLS}
58 xstat_fs_callback.o: xstat_fs_callback.c ${FSINCLS}
60 xstat_fs_test.o: xstat_fs_test.c ${FSINCLS} AFS_component_version_number.c
62 xstat_fs_test: xstat_fs_test.o libxstat_fs.a ${LIBS}
63 $(AFS_LDRULE) xstat_fs_test.o libxstat_fs.a \
64 ${LIBS} $(LIB_roken) ${XLIBS}
67 # Cache Manager data collection
69 CMINCLS=xstat_cm.h ${RPCINCLS}
71 libxstat_cm.a: xstat_cm.o AFS_component_version_number.o
72 -$(RM) -f libxstat_cm.a
73 $(AR) crv libxstat_cm.a xstat_cm.o AFS_component_version_number.o
74 $(RANLIB) libxstat_cm.a
76 xstat_cm.o: xstat_cm.c ${CMINCLS}
78 xstat_cm_test.o: xstat_cm_test.c ${CMINCLS} AFS_component_version_number.c
80 xstat_cm_test: xstat_cm_test.o libxstat_cm.a ${LIBS}
81 $(AFS_LDRULE) xstat_cm_test.o libxstat_cm.a \
82 ${LIBS} $(LIB_roken) ${XLIBS}
85 # Installation targets
87 install: xstat_fs.h xstat_cm.h libxstat_fs.a libxstat_cm.a xstat_fs_test \
89 ${INSTALL} -d ${DESTDIR}${includedir}/afs
90 ${INSTALL} -d ${DESTDIR}${libdir}/afs
91 ${INSTALL} -d ${DESTDIR}${bindir}
92 ${INSTALL_DATA} ${srcdir}/xstat_fs.h ${DESTDIR}${includedir}/afs/xstat_fs.h
93 ${INSTALL_DATA} ${srcdir}/xstat_cm.h ${DESTDIR}${includedir}/afs/xstat_cm.h
94 ${INSTALL_DATA} libxstat_fs.a ${DESTDIR}${libdir}/afs/libxstat_fs.a
95 ${INSTALL_DATA} libxstat_cm.a ${DESTDIR}${libdir}/afs/libxstat_cm.a
96 ${INSTALL_PROGRAM} xstat_fs_test ${DESTDIR}${bindir}/xstat_fs_test
97 ${INSTALL_PROGRAM} xstat_cm_test ${DESTDIR}${bindir}/xstat_cm_test
99 dest: xstat_fs.h xstat_cm.h libxstat_fs.a libxstat_cm.a xstat_fs_test \
101 ${INSTALL} -d ${DEST}/include/afs
102 ${INSTALL} -d ${DEST}/lib/afs
103 ${INSTALL} -d ${DEST}/bin
104 ${INSTALL_DATA} ${srcdir}/xstat_fs.h ${DEST}/include/afs/xstat_fs.h
105 ${INSTALL_DATA} ${srcdir}/xstat_cm.h ${DEST}/include/afs/xstat_cm.h
106 ${INSTALL_DATA} libxstat_fs.a ${DEST}/lib/afs/libxstat_fs.a
107 ${INSTALL_DATA} libxstat_cm.a ${DEST}/lib/afs/libxstat_cm.a
108 ${INSTALL_PROGRAM} xstat_fs_test ${DEST}/bin/xstat_fs_test
109 ${INSTALL_PROGRAM} xstat_cm_test ${DEST}/bin/xstat_cm_test
115 $(RM) -f *.o *.a xstat_fs_test xstat_cm_test core AFS_component_version_number.c
117 include ../config/Makefile.version