7158bb8b584776bd1c07a9b2c237cca0c9767aed
[openafs.git] / src / rxstat / Makefile
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 SHELL = /bin/sh
9 include ../config/Makefile.${SYS_NAME}
10 include ../config/Makefile.version
11
12 KERNELDIR = ../libafs/
13 UKERNELDIR = ../libuafs/
14 RXGEN=${SRCDIR}bin/rxgen
15 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
16
17 KSRCS=rxstat.c rxstat.h Krxstat.ss.c Krxstat.xdr.c
18
19 CFLAGS = $(DBUG) -I${SRCDIR}include ${XCFLAGS}
20
21 LIBOBJS = rxstat.cs.o rxstat.ss.o rxstat.xdr.o rxstat.o
22
23 rxstat.cs.c rxstat.ss.c rxstat.xdr.c rxstat.h: rxstat.xg
24         ${RXGEN} -x rxstat.xg
25
26 librxstat.a: ${LIBOBJS} AFS_component_version_number.o
27         -rm -f $@
28         $(AR) rv $@ AFS_component_version_number.o ${LIBOBJS}
29         $(RANLIB) $@
30
31 kinstall: ${KSRCS} 
32         set ${KERNELDIR}afsint; $(MKDIR_IF_NEEDED)
33         ${INSTALL} ${KSRCS} ${KERNELDIR}afsint
34
35 ukinstall webinstall:  ${KSRCS}
36         set ${UKERNELDIR}afsint; $(MKDIR_IF_NEEDED)
37         ${INSTALL} ${KSRCS} ${UKERNELDIR}afsint
38
39 Krxstat.cs.c: rxstat.xg
40         ${RXGEN} -x -k -C -o $@ rxstat.xg
41
42 Krxstat.ss.c: rxstat.xg
43         ${RXGEN} -x -k -S -o $@ rxstat.xg
44
45 Krxstat.xdr.c: rxstat.xg
46         ${RXGEN} -x -k -c -o $@ rxstat.xg
47
48 install: librxstat.a includes kinstall ukinstall
49         ${INSTALL} librxstat.a ${DESTDIR}lib
50
51 includes: rxstat.h
52         ${INSTALL} rxstat.h ${DESTDIR}include/rx
53
54 clean:
55         rm -f rxstat.h *.xdr.c *.cs.c *.ss.c *.o *.a core *_component_version_number.c