Unix: Rework build system
[openafs.git] / src / bubasics / 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 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.lwp
11
12 INSTALL = @INSTALL@
13 INSTALL_DATA = @INSTALL_DATA@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@
15 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16
17 all: ${TOP_LIBDIR}/libbubasics.a ${TOP_INCDIR}/afs/bumon.h ${TOP_INCDIR}/afs/butc.h ${TOP_INCDIR}/afs/bubasics.h ${TOP_INCDIR}/afs/butx.h \
18                 ${TOP_INCDIR}/afs/tcdata.h ${TOP_INCDIR}/afs/butm.h
19
20 generated: \
21         butc.ss.c butc.cs.c butc.xdr.c butc.h \
22         bumon.ss.c bumon.cs.c bumon.xdr.c bumon.h \
23         butc_errs.c tcdata.h \
24         butm_errs.c butm.h \
25         butx_errs.c butx.h
26
27 OBJS=butc.ss.o butc.cs.o butc.xdr.o bumon.ss.o bumon.cs.o bumon.xdr.o butc_errs.o butm_errs.o butx_errs.o
28
29 ${TOP_LIBDIR}/libbubasics.a: libbubasics.a
30         ${INSTALL_DATA} $? $@
31
32 ${TOP_INCDIR}/afs/bumon.h: bumon.h
33         ${INSTALL_DATA} $? $@
34
35 ${TOP_INCDIR}/afs/butc.h: butc.h
36         ${INSTALL_DATA} $? $@
37
38 ${TOP_INCDIR}/afs/bubasics.h: bubasics.h
39         ${INSTALL_DATA} $? $@
40
41 ${TOP_INCDIR}/afs/tcdata.h: tcdata.h
42         ${INSTALL_DATA} $? $@
43
44 ${TOP_INCDIR}/afs/butm.h: butm.h
45         ${INSTALL_DATA} $? $@
46
47 ${TOP_INCDIR}/afs/butx.h: butx.h
48         ${INSTALL_DATA} $? $@
49
50 libbubasics.a: $(OBJS) AFS_component_version_number.o
51         -$(RM) -f libbubasics.a
52         ar r libbubasics.a ${OBJS} AFS_component_version_number.o
53         ${RANLIB} libbubasics.a
54
55 butc.xdr.c: butc.xg
56         ${RXGEN} -A -c -o $@ ${srcdir}/butc.xg
57
58 butc.ss.c: butc.xg
59         ${RXGEN} -A -S -o $@ ${srcdir}/butc.xg
60
61 butc.cs.c: butc.xg
62         ${RXGEN} -A -C -o $@ ${srcdir}/butc.xg
63
64 butc.h: butc.xg
65         ${RXGEN} -A -h -o $@ ${srcdir}/butc.xg
66
67 butc.xdr.c: butc.h
68 butc.cs.c: butc.h
69 butc.ss.c: butc.h
70
71 bumon.xdr.c: bumon.xg
72         ${RXGEN} -A -c -o $@ ${srcdir}/bumon.xg
73
74 bumon.ss.c: bumon.xg
75         ${RXGEN} -A -S -o $@ ${srcdir}/bumon.xg
76
77 bumon.cs.c: bumon.xg
78         ${RXGEN} -A -C -o $@ ${srcdir}/bumon.xg
79
80 bumon.h: bumon.xg
81         ${RXGEN} -A -h -o $@ ${srcdir}/bumon.xg
82
83 bumon.xdr.c: bumon.h
84 bumon.ss.c: bumon.h
85 bumon.cs.c: bumon.h
86
87 butm.h: butm_errs.c
88
89 butm_errs.c: butm_errs.et butm.p.h
90         $(RM) -f butm.h butm_errs.c
91         ${COMPILE_ET} -p ${srcdir} butm_errs -h butm
92
93 tcdata.h: butc_errs.c
94
95 butc_errs.c: butc_errs.et tcdata.p.h butm.h
96         $(RM) -f tcdata.h butc_errs.c
97         ${COMPILE_ET} -p ${srcdir} butc_errs -h tcdata
98
99 butx.h: butx_errs.c
100
101 butx_errs.c: butx_errs.et
102         $(RM) -f butx.h butx_errs.c
103         ${COMPILE_ET} -p ${srcdir} butx_errs -h butx
104
105 #
106 # Installation targets
107 #
108 install: libbubasics.a bumon.h butc.h bubasics.h tcdata.h butm.h butx.h
109         ${INSTALL} -d ${DESTDIR}${libdir}/afs
110         ${INSTALL} -d ${DESTDIR}${includedir}/afs
111         ${INSTALL_DATA} libbubasics.a ${DESTDIR}${libdir}/afs/libbubasics.a
112         ${INSTALL_DATA} bumon.h ${DESTDIR}${includedir}/afs/bumon.h
113         ${INSTALL_DATA} butc.h ${DESTDIR}${includedir}/afs/butc.h
114         ${INSTALL_DATA} ${srcdir}/bubasics.h ${DESTDIR}${includedir}/afs/bubasics.h
115         ${INSTALL_DATA} tcdata.h ${DESTDIR}${includedir}/afs/tcdata.h
116         ${INSTALL_DATA} butm.h ${DESTDIR}${includedir}/afs/butm.h
117         ${INSTALL_DATA} butx.h ${DESTDIR}${includedir}/afs/butx.h
118
119 dest: libbubasics.a bumon.h butc.h bubasics.h tcdata.h butm.h butx.h
120         ${INSTALL} -d ${DEST}/lib/afs
121         ${INSTALL} -d ${DEST}/include/afs
122         ${INSTALL_DATA} libbubasics.a ${DEST}/lib/afs/libbubasics.a
123         ${INSTALL_DATA} bumon.h ${DEST}/include/afs/bumon.h
124         ${INSTALL_DATA} butc.h ${DEST}/include/afs/butc.h
125         ${INSTALL_DATA} ${srcdir}/bubasics.h ${DEST}/include/afs/bubasics.h
126         ${INSTALL_DATA} tcdata.h ${DEST}/include/afs/tcdata.h
127         ${INSTALL_DATA} butm.h ${DEST}/include/afs/butm.h
128         ${INSTALL_DATA} butx.h ${DEST}/include/afs/butx.h
129
130 #
131 # Common targets
132 #
133
134 clean:
135         $(RM) -f *.o *.a *.xdr.c *.ss.c *.cs.c butc.h butx.h butm.h bumon.h tcdata.h \
136                 butc_errs.c butx_errs.c butm_errs.c core AFS_component_version_number.c
137
138 include ../config/Makefile.version