makefile-updates-20010828
[openafs.git] / src / rxstat / Makefile.in
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 DESTDIR=@DESTDIR@
9 SRCDIR=@SRCDIR@
10 TOP_SRCDIR=@TOP_SRCDIR@
11 SYS_NAME=@AFS_SYSNAME@
12
13 SHELL = /bin/sh
14 include ../config/Makefile.${SYS_NAME}
15
16 KERNELDIR = ../libafs/
17 UKERNELDIR = ../libuafs/
18 RXGEN=${SRCDIR}/bin/rxgen
19 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
20
21 KSRCS=rxstat.c rxstat.h Krxstat.ss.c Krxstat.xdr.c
22
23 CFLAGS = -I${TOP_SRCDIR}/config -I${SRCDIR}/include ${XCFLAGS}
24
25 LIBOBJS = rxstat.cs.o rxstat.ss.o rxstat.xdr.o rxstat.o
26
27 all: install
28
29 #
30 # Build targets
31 #
32 rxstat.cs.c rxstat.ss.c rxstat.xdr.c rxstat.h: rxstat.xg
33         ${RXGEN} -x rxstat.xg
34
35 librxstat.a: ${LIBOBJS} AFS_component_version_number.o
36         -rm -f $@
37         $(AR) rv $@ AFS_component_version_number.o ${LIBOBJS}
38         $(RANLIB) $@
39
40 Krxstat.cs.c: rxstat.xg
41         ${RXGEN} -x -k -C -o $@ rxstat.xg
42
43 Krxstat.ss.c: rxstat.xg
44         ${RXGEN} -x -k -S -o $@ rxstat.xg
45
46 Krxstat.xdr.c: rxstat.xg
47         ${RXGEN} -x -k -c -o $@ rxstat.xg
48
49 #
50 # Install targets
51 #
52 install: kinstall ukinstall \
53         ${DESTDIR}/include/rx/rxstat.h \
54         ${DESTDIR}/lib/librxstat.a 
55
56 ${DESTDIR}/lib/librxstat.a: librxstat.a
57         ${INSTALL} $? $@
58
59 ${DESTDIR}/include/rx/rxstat.h: rxstat.h
60         ${INSTALL} $? $@
61
62 kinstall: ${KERNELDIR}/afsint \
63         ${KERNELDIR}/afsint/rxstat.c \
64         ${KERNELDIR}/afsint/rxstat.h \
65         ${KERNELDIR}/afsint/Krxstat.ss.c \
66         ${KERNELDIR}/afsint/Krxstat.xdr.c 
67
68 ${KERNELDIR}/afsint:
69         mkdir -p $?
70
71 ${KERNELDIR}/afsint/rxstat.c: rxstat.c
72         ${INSTALL} $? $@
73
74 ${KERNELDIR}/afsint/rxstat.h: rxstat.h
75         ${INSTALL} $? $@
76
77 ${KERNELDIR}/afsint/Krxstat.ss.c: Krxstat.ss.c
78         ${INSTALL} $? $@
79
80 ${KERNELDIR}/afsint/Krxstat.xdr.c: Krxstat.xdr.c
81         ${INSTALL} $? $@
82
83 ukinstall: ${UKERNELDIR}/afsint \
84         ${UKERNELDIR}/afsint/rxstat.c \
85         ${UKERNELDIR}/afsint/rxstat.h \
86         ${UKERNELDIR}/afsint/Krxstat.ss.c \
87         ${UKERNELDIR}/afsint/Krxstat.xdr.c
88
89 ${UKERNELDIR}/afsint:
90         mkdir -p $?
91
92 ${UKERNELDIR}/afsint/rxstat.c: rxstat.c
93         ${INSTALL} $? $@
94
95 ${UKERNELDIR}/afsint/rxstat.h: rxstat.h
96         ${INSTALL} $? $@
97
98 ${UKERNELDIR}/afsint/Krxstat.ss.c: Krxstat.ss.c
99         ${INSTALL} $? $@
100
101 ${UKERNELDIR}/afsint/Krxstat.xdr.c: Krxstat.xdr.c
102         ${INSTALL} $? $@
103
104 #
105 # Misc. targets
106 #
107 clean:
108         rm -f rxstat.h *.xdr.c *.cs.c *.ss.c *.o *.a core AFS_component_version_number.c
109
110 include ../config/Makefile.version