introduce-autoconf-for-openafs-20010628
[openafs.git] / src / fsint / 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 COMPONENT=fsint
9 include ../config/Makefile.${SYS_NAME}
10 SHELL = /bin/sh
11 KERNELDIR = ../libafs/
12 UKERNELDIR = ../libuafs/
13 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
14
15 OBJS=afsaux.o afscbint.cs.o afscbint.ss.o afscbint.xdr.o afsint.cs.o afsint.ss.o afsint.xdr.o
16 CFLAGS=${DBUG} -I${SRCDIR}include ${XCFLAGS}
17 KDSRCS=Kcallback.ss.c Kcallback.h Kvice.cs.c Kvice.h Kvice.xdr.c afscbint.h \
18 afsint.h
19 KSRCS=${KDSRCS} afsaux.c
20 UKSRCS=${KSRCS}
21 UTILS=$(SRCDIR)/bin/rxgen
22
23 include ../config/Makefile.version
24
25 noversion: install
26
27 all: libafsint.a $(KSRCS)
28
29 libafsint.a: ${OBJS} AFS_component_version_number.o
30         -rm -f $@
31         $(AR) rv $@ ${OBJS} AFS_component_version_number.o
32         $(RANLIB) $@
33
34 afsaux.o: afsaux.c afsint.h
35
36 Kcallback.cs.c: common.xg afscbint.xg Kvice.h Kcallback.h $(UTILS)
37         ${SRCDIR}bin/rxgen -x -k -C -o Kcallback.cs.c afscbint.xg
38
39 Kcallback.ss.c: common.xg afscbint.xg Kvice.h Kcallback.h $(UTILS)
40         ${SRCDIR}bin/rxgen -x -k -S -o Kcallback.ss.c afscbint.xg
41
42 Kcallback.xdr.c: common.xg afscbint.xg Kvice.h Kcallback.h $(UTILS)
43         ${SRCDIR}bin/rxgen -x -k -y -c -o Kcallback.xdr.c afscbint.xg
44
45 Kvice.cs.c: common.xg afsint.xg Kvice.h  $(UTILS)
46         ${SRCDIR}bin/rxgen -x -k -C -o Kvice.cs.c afsint.xg
47
48 Kvice.ss.c: common.xg afsint.xg Kvice.h $(UTILS)
49         ${SRCDIR}bin/rxgen -x -k -S -o Kvice.ss.c afsint.xg
50
51 Kvice.xdr.c: common.xg afsint.xg $(UTILS)
52         ${SRCDIR}bin/rxgen -x -k -c -o Kvice.xdr.c afsint.xg
53
54 Kvice.h: common.xg afsint.xg $(UTILS)
55         ${SRCDIR}bin/rxgen -x -k -h -o Kvice.h afsint.xg
56
57 Kcallback.h: common.xg afscbint.xg $(UTILS)
58         ${SRCDIR}bin/rxgen -x -k -h -o Kcallback.h afscbint.xg
59
60 afscbint.cs.c: common.xg afscbint.xg afsint.h afscbint.h $(UTILS)
61         ${SRCDIR}bin/rxgen -x -C -o afscbint.cs.c afscbint.xg
62
63 afscbint.ss.c: common.xg afscbint.xg afsint.h afscbint.h $(UTILS)
64         ${SRCDIR}bin/rxgen -x -S -o afscbint.ss.c afscbint.xg
65
66 afscbint.xdr.c: common.xg afscbint.xg afsint.h afscbint.h $(UTILS)
67         ${SRCDIR}bin/rxgen -x -y -c -o afscbint.xdr.c afscbint.xg
68
69 afsint.cs.c: common.xg afsint.xg afsint.h $(UTILS)
70         ${SRCDIR}bin/rxgen -x -C -o afsint.cs.c afsint.xg
71
72 afsint.ss.c: common.xg afsint.xg afsint.h $(UTILS)
73         ${SRCDIR}bin/rxgen -x -S -o afsint.ss.c afsint.xg
74
75 afsint.xdr.c: common.xg afsint.xg $(UTILS)
76         ${SRCDIR}bin/rxgen -x -c -o afsint.xdr.c afsint.xg
77
78 afsint.h: common.xg afsint.xg $(UTILS)
79         ${SRCDIR}bin/rxgen -x -h -o afsint.h afsint.xg
80
81 afscbint.h: common.xg afscbint.xg $(UTILS)
82         ${SRCDIR}bin/rxgen -x -h -o afscbint.h afscbint.xg
83
84 system: install
85
86 kinstall: ${KSRCS}
87         set ${KERNELDIR}afsint; $(MKDIR_IF_NEEDED)
88         ${INSTALL} $(KSRCS) ${KERNELDIR}afsint
89         ${INSTALL} $(SRCDIR)include/afs/rxgen_consts.h ${KERNELDIR}afsint
90         -${INSTALL} ${KERNELDIR}rx/rx.h ${KERNELDIR}afsint/rx.h
91         ${INSTALL} afscbint.h ${KERNELDIR}afs
92
93 ukinstall webinstall: ${UKSRCS}
94         set ${UKERNELDIR}afsint; $(MKDIR_IF_NEEDED)
95         ${INSTALL} $(UKSRCS) ${UKERNELDIR}afsint
96         ${INSTALL} $(SRCDIR)include/afs/rxgen_consts.h ${UKERNELDIR}afsint
97         -${INSTALL} ${UKERNELDIR}rx/rx.h ${UKERNELDIR}afsint/rx.h
98         ${INSTALL} afscbint.h ${UKERNELDIR}afs
99
100 install:  all  kinstall ukinstall
101         ${INSTALL} libafsint.a ${DESTDIR}lib/afs
102         ${INSTALL} afsint.h ${DESTDIR}include/afs
103         ${INSTALL} afscbint.h ${DESTDIR}include/afs
104
105 clean:
106         rm -f *.o *.cs.c *.ss.c *.er.c afsint.h afsint.xdr.c libafsint.a $(KDSRCS) core AFS_component_version_number.c afscbint.xdr.c