Commit | Line | Data |
---|---|---|
805e021f CE |
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 | # Makefile for the module providing the client side of the File Server | |
9 | # and Cache Manager extended statistics gathering. | |
10 | ||
11 | srcdir=@srcdir@ | |
12 | include @TOP_OBJDIR@/src/config/Makefile.config | |
13 | include @TOP_OBJDIR@/src/config/Makefile.lwp | |
14 | ||
15 | ||
16 | RPCINCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/rx/rx.h | |
17 | ||
18 | LIBS=${TOP_LIBDIR}/libafsint.a \ | |
19 | ${TOP_LIBDIR}/libcmd.a \ | |
20 | ${TOP_LIBDIR}/librx.a \ | |
21 | ${TOP_LIBDIR}/libafshcrypto_lwp.a \ | |
22 | ${TOP_LIBDIR}/liblwp.a \ | |
23 | ${TOP_LIBDIR}/libsys.a \ | |
24 | ${TOP_LIBDIR}/libopr.a \ | |
25 | ${TOP_LIBDIR}/util.a | |
26 | ||
27 | all: \ | |
28 | ${TOP_INCDIR}/afs/xstat_fs.h \ | |
29 | ${TOP_INCDIR}/afs/xstat_cm.h \ | |
30 | ${TOP_LIBDIR}/libxstat_fs.a \ | |
31 | ${TOP_LIBDIR}/libxstat_cm.a \ | |
32 | xstat_fs_test \ | |
33 | xstat_cm_test | |
34 | ||
35 | ${TOP_INCDIR}/afs/xstat_fs.h: xstat_fs.h | |
36 | ${INSTALL_DATA} $? $@ | |
37 | ||
38 | ${TOP_INCDIR}/afs/xstat_cm.h: xstat_cm.h | |
39 | ${INSTALL_DATA} $? $@ | |
40 | ||
41 | ${TOP_LIBDIR}/libxstat_fs.a: libxstat_fs.a | |
42 | ${INSTALL_DATA} $? $@ | |
43 | ||
44 | ${TOP_LIBDIR}/libxstat_cm.a: libxstat_cm.a | |
45 | ${INSTALL_DATA} $? $@ | |
46 | ||
47 | # | |
48 | # File Server data collection | |
49 | # | |
50 | FSINCLS=xstat_fs.h ${RPCINCLS} | |
51 | ||
52 | libxstat_fs.a: xstat_fs.o xstat_fs_callback.o AFS_component_version_number.o | |
53 | -$(RM) -f $@ | |
54 | $(AR) crv $@ xstat_fs.o xstat_fs_callback.o AFS_component_version_number.o | |
55 | $(RANLIB) $@ | |
56 | ||
57 | xstat_fs.o: xstat_fs.c ${FSINCLS} | |
58 | ||
59 | xstat_fs_callback.o: xstat_fs_callback.c ${FSINCLS} | |
60 | ||
61 | xstat_fs_test.o: xstat_fs_test.c ${FSINCLS} AFS_component_version_number.c | |
62 | ||
63 | xstat_fs_test: xstat_fs_test.o libxstat_fs.a ${LIBS} | |
64 | $(AFS_LDRULE) xstat_fs_test.o libxstat_fs.a \ | |
65 | ${LIBS} $(LIB_roken) ${XLIBS} | |
66 | ||
67 | # | |
68 | # Cache Manager data collection | |
69 | # | |
70 | CMINCLS=xstat_cm.h ${RPCINCLS} | |
71 | ||
72 | libxstat_cm.a: xstat_cm.o AFS_component_version_number.o | |
73 | -$(RM) -f libxstat_cm.a | |
74 | $(AR) crv libxstat_cm.a xstat_cm.o AFS_component_version_number.o | |
75 | $(RANLIB) libxstat_cm.a | |
76 | ||
77 | xstat_cm.o: xstat_cm.c ${CMINCLS} | |
78 | ||
79 | xstat_cm_test.o: xstat_cm_test.c ${CMINCLS} AFS_component_version_number.c | |
80 | ||
81 | xstat_cm_test: xstat_cm_test.o libxstat_cm.a ${LIBS} | |
82 | $(AFS_LDRULE) xstat_cm_test.o libxstat_cm.a \ | |
83 | ${LIBS} $(LIB_roken) ${XLIBS} | |
84 | ||
85 | # | |
86 | # Installation targets | |
87 | # | |
88 | install: xstat_fs.h xstat_cm.h libxstat_fs.a libxstat_cm.a xstat_fs_test \ | |
89 | xstat_cm_test | |
90 | ${INSTALL} -d ${DESTDIR}${includedir}/afs | |
91 | ${INSTALL} -d ${DESTDIR}${libdir}/afs | |
92 | ${INSTALL} -d ${DESTDIR}${bindir} | |
93 | ${INSTALL_DATA} ${srcdir}/xstat_fs.h ${DESTDIR}${includedir}/afs/xstat_fs.h | |
94 | ${INSTALL_DATA} ${srcdir}/xstat_cm.h ${DESTDIR}${includedir}/afs/xstat_cm.h | |
95 | ${INSTALL_DATA} libxstat_fs.a ${DESTDIR}${libdir}/afs/libxstat_fs.a | |
96 | ${INSTALL_DATA} libxstat_cm.a ${DESTDIR}${libdir}/afs/libxstat_cm.a | |
97 | ${INSTALL_PROGRAM} xstat_fs_test ${DESTDIR}${bindir}/xstat_fs_test | |
98 | ${INSTALL_PROGRAM} xstat_cm_test ${DESTDIR}${bindir}/xstat_cm_test | |
99 | ||
100 | dest: xstat_fs.h xstat_cm.h libxstat_fs.a libxstat_cm.a xstat_fs_test \ | |
101 | xstat_cm_test | |
102 | ${INSTALL} -d ${DEST}/include/afs | |
103 | ${INSTALL} -d ${DEST}/lib/afs | |
104 | ${INSTALL} -d ${DEST}/bin | |
105 | ${INSTALL_DATA} ${srcdir}/xstat_fs.h ${DEST}/include/afs/xstat_fs.h | |
106 | ${INSTALL_DATA} ${srcdir}/xstat_cm.h ${DEST}/include/afs/xstat_cm.h | |
107 | ${INSTALL_DATA} libxstat_fs.a ${DEST}/lib/afs/libxstat_fs.a | |
108 | ${INSTALL_DATA} libxstat_cm.a ${DEST}/lib/afs/libxstat_cm.a | |
109 | ${INSTALL_PROGRAM} xstat_fs_test ${DEST}/bin/xstat_fs_test | |
110 | ${INSTALL_PROGRAM} xstat_cm_test ${DEST}/bin/xstat_cm_test | |
111 | ||
112 | # | |
113 | # Misc targets | |
114 | # | |
115 | clean: | |
116 | $(RM) -f *.o *.a xstat_fs_test xstat_cm_test core AFS_component_version_number.c | |
117 | ||
118 | include ../config/Makefile.version |