initial-objdir-support-20011017
[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 DEST=@DEST@
9 TOP_INCDIR=@TOP_INCDIR@
10 TOP_LIBDIR=@TOP_LIBDIR@
11 TOP_OBJDIR=@TOP_OBJDIR@
12 srcdir=@srcdir@
13 VPATH=${srcdir}
14 prefix=@prefix@
15 exec_prefix=@exec_prefix@
16 bindir=@bindir@
17 sbindir=@sbindir@
18 libexecdir=@libexecdir@
19 libdir=@libdir@
20 includedir=@includedir@
21 mandir=@mandir@
22 afssrvbindir=@afssrvbindir@
23 afssrvsbindir=@afssrvsbindir@
24 afssrvlibexecdir=@afssrvlibexecdir@
25 COMPILE_ET=${TOP_OBJDIR}/src/comerr/compile_et
26 TOP_SRCDIR=@TOP_SRCDIR@
27 SYS_NAME=@AFS_SYSNAME@
28
29 SHELL = /bin/sh
30 include ../config/Makefile.${SYS_NAME}
31
32 KERNELDIR = ../libafs/
33 UKERNELDIR = ../libuafs/
34 RXGEN=${TOP_OBJDIR}/src/rxgen/rxgen
35
36 KSRCS=rxstat.c rxstat.h Krxstat.ss.c Krxstat.xdr.c
37
38 CFLAGS=-I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
39
40 LIBOBJS = rxstat.cs.o rxstat.ss.o rxstat.xdr.o rxstat.o
41
42 all: kinstall ukinstall ${TOP_INCDIR}/rx/rxstat.h ${TOP_LIBDIR}/librxstat.a
43
44 #
45 # Build targets
46 #
47 rxstat.cs.c rxstat.ss.c rxstat.xdr.c rxstat.h: rxstat.xg
48         ${RXGEN} -x ${srcdir}/rxstat.xg
49
50 librxstat.a: ${LIBOBJS} AFS_component_version_number.o
51         -$(RM) -f $@
52         $(AR) crv $@ ${LIBOBJS} AFS_component_version_number.o
53         $(RANLIB) $@
54
55 Krxstat.cs.c: rxstat.xg
56         ${RXGEN} -x -k -C -o $@ ${srcdir}/rxstat.xg
57
58 Krxstat.ss.c: rxstat.xg
59         ${RXGEN} -x -k -S -o $@ ${srcdir}/rxstat.xg
60
61 Krxstat.xdr.c: rxstat.xg
62         ${RXGEN} -x -k -c -o $@ ${srcdir}/rxstat.xg
63
64 #
65 # Install targets
66 #
67 install:   ${DESTDIR}${includedir}/rx/rxstat.h ${DESTDIR}${libdir}/librxstat.a
68
69 ${DEST}/lib/librxstat.a: librxstat.a
70         ${INSTALL} $? $@
71
72 ${DEST}/include/rx/rxstat.h: rxstat.h
73         ${INSTALL} $? $@
74
75 kinstall: ${KERNELDIR}/afsint \
76         ${KERNELDIR}/afsint/rxstat.c \
77         ${KERNELDIR}/afsint/rxstat.h \
78         ${KERNELDIR}/afsint/Krxstat.ss.c \
79         ${KERNELDIR}/afsint/Krxstat.xdr.c 
80
81 ${KERNELDIR}/afsint:
82         mkdir -p $?
83
84 ${KERNELDIR}/afsint/rxstat.c: rxstat.c
85         ${INSTALL} $? $@
86
87 ${KERNELDIR}/afsint/rxstat.h: rxstat.h
88         ${INSTALL} $? $@
89
90 ${KERNELDIR}/afsint/Krxstat.ss.c: Krxstat.ss.c
91         ${INSTALL} $? $@
92
93 ${KERNELDIR}/afsint/Krxstat.xdr.c: Krxstat.xdr.c
94         ${INSTALL} $? $@
95
96 ukinstall: ${UKERNELDIR}/afsint \
97         ${UKERNELDIR}/afsint/rxstat.c \
98         ${UKERNELDIR}/afsint/rxstat.h \
99         ${UKERNELDIR}/afsint/Krxstat.ss.c \
100         ${UKERNELDIR}/afsint/Krxstat.xdr.c
101
102 ${UKERNELDIR}/afsint:
103         mkdir -p $?
104
105 ${UKERNELDIR}/afsint/rxstat.c: rxstat.c
106         ${INSTALL} $? $@
107
108 ${UKERNELDIR}/afsint/rxstat.h: rxstat.h
109         ${INSTALL} $? $@
110
111 ${UKERNELDIR}/afsint/Krxstat.ss.c: Krxstat.ss.c
112         ${INSTALL} $? $@
113
114 ${UKERNELDIR}/afsint/Krxstat.xdr.c: Krxstat.xdr.c
115         ${INSTALL} $? $@
116
117 #
118 # Misc. targets
119 #
120 clean:
121         $(RM) -f rxstat.h *.xdr.c *.cs.c *.ss.c *.o *.a core AFS_component_version_number.c
122
123 include ../config/Makefile.version
124 ${DESTDIR}${includedir}/rx/rxstat.h: rxstat.h
125         ${INSTALL} $? $@
126
127 ${TOP_INCDIR}/rx/rxstat.h: rxstat.h
128         ${INSTALL} $? $@
129
130 ${DESTDIR}${libdir}/librxstat.a: librxstat.a
131         ${INSTALL} $? $@
132
133 ${TOP_LIBDIR}/librxstat.a: librxstat.a
134         ${INSTALL} $? $@
135
136 dest:   ${DEST}/include/rx/rxstat.h ${DEST}/lib/librxstat.a
137