generated file target
[openafs.git] / src / bozo / 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 INSTALL = @INSTALL@
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
14
15 RPCINCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/rx/rx.h bosint.h
16
17 INCLS=bnode.h \
18         ${RPCINCLS} \
19         ${TOP_INCDIR}/afs/auth.h \
20         ${TOP_INCDIR}/afs/keys.h \
21         ${TOP_INCDIR}/afs/cellconfig.h \
22         ${TOP_INCDIR}/afs/cmd.h \
23         ${TOP_INCDIR}/afs/ktime.h
24
25 # EH 12/18/90 - have to search librx.a twice on Ultrix 4.0
26 LIBS=${TOP_LIBDIR}/librx.a \
27         ${TOP_LIBDIR}/liblwp.a \
28         ${TOP_LIBDIR}/libcmd.a \
29         ${TOP_LIBDIR}/libkauth.a \
30         ${TOP_LIBDIR}/libvolser.a \
31         ${TOP_LIBDIR}/libvldb.a \
32         ${TOP_LIBDIR}/libauth.a \
33         ${TOP_LIBDIR}/librxstat.a \
34         ${TOP_LIBDIR}/librxkad.a \
35         ${TOP_LIBDIR}/libdes.a \
36         ${TOP_LIBDIR}/libubik.a \
37         ${TOP_LIBDIR}/librx.a \
38         ${TOP_LIBDIR}/libcom_err.a \
39         ${TOP_LIBDIR}/util.a \
40         ${TOP_LIBDIR}/libsys.a \
41         ${TOP_LIBDIR}/libprocmgmt.a
42
43 OBJS=bosserver.o bnode.o ezbnodeops.o fsbnodeops.o bosint.ss.o bosint.xdr.o \
44 bosoprocs.o cronbnodeops.o
45
46 all: bosserver ${TOP_INCDIR}/afs/bosint.h bos ${TOP_LIBDIR}/libbos.a bos_util
47
48 generated: bosint.ss.c bosint.xdr.c bosint.cs.c bosint.h bnode.h boserr.c
49
50 ${TOP_INCDIR}/afs/bosint.h: bosint.h
51         ${INSTALL_DATA} $? $@
52
53 ${TOP_INCDIR}/afs/bnode.h: bnode.h
54         ${INSTALL_DATA} $? $@
55
56 ${TOP_LIBDIR}/libbos.a: libbos.a
57         ${INSTALL_DATA} $? $@
58
59 $(OBJS) bosint.xdr.o bosint.cs.o boserr.o: $(INCLS)
60
61 bosint.ss.o: bosint.ss.c ${RPCINCLS}
62 bosint.xdr.o: bosint.xdr.c ${RPCINCLS}
63 bosint.cs.o: bosint.cs.c ${RPCINCLS}
64
65 bosint.cs.c: bosint.xg
66         ${RXGEN} -x -A -C -o $@ ${srcdir}/bosint.xg
67
68 bosint.ss.c: bosint.xg
69         ${RXGEN} -x -A -S -o $@ ${srcdir}/bosint.xg
70
71 bosint.xdr.c: bosint.xg
72         ${RXGEN} -x -A -c -o $@ ${srcdir}/bosint.xg
73
74 bosint.h: bosint.xg
75         ${RXGEN} -x -A -h -o $@ ${srcdir}/bosint.xg
76
77 bosint.cs.c: bosint.h
78 bosint.ss.c: bosint.h
79 bosint.xdr.c: bosint.h
80
81 bnode.h: boserr.c
82
83 boserr.c: bnode.p.h boserr.et
84         $(RM) -f boserr.c bnode.h
85         ${COMPILE_ET} -p ${srcdir} boserr -h bnode
86
87 bosserver.o: bosserver.c ${INCLS} AFS_component_version_number.o
88
89 cronbnodeops.o: cronbnodeops.c ${INCLS}
90
91 bnode.o: bnode.c ${INCLS}
92
93 bosoprocs.o: bosoprocs.c ${INCLS}
94
95 bos.o: bos.c ${INCLS} AFS_component_version_number.o
96         $(CC) $(CFLAGS) -c $<
97
98 bos: bos.o $(LIBS) libbos.a
99         ${CC} ${CFLAGS} -o bos bos.o libbos.a $(LIBS)  ${XLIBS}
100
101 bos_util.o: bos_util.c ${INCLS} AFS_component_version_number.o ${TOP_INCDIR}/afs/bnode.h
102         $(CC) $(CFLAGS) -c $<
103
104 bos_util: bos_util.o $(LIBS) 
105         ${CC} ${CFLAGS} -o bos_util bos_util.o $(LIBS)  ${XLIBS}
106
107 ezbnodeops.o: ezbnodeops.c ${INCLS}
108
109 fsbnodeops.o: fsbnodeops.c ${INCLS}
110
111 libbos.a: bosint.xdr.o bosint.cs.o boserr.o AFS_component_version_number.o
112         -$(RM) -f $@
113         $(AR) crv $@ bosint.xdr.o bosint.cs.o boserr.o AFS_component_version_number.o
114         $(RANLIB) $@
115
116 bosserver: $(OBJS) $(LIBS)
117         ${CC} $(CFLAGS) -o bosserver $(OBJS) ${TOP_LIBDIR}/libaudit.a $(LIBS)  ${XLIBS} 
118
119 #
120 # Install targets
121 #
122 install: bosserver bos bos_util libbos.a bosint.h bnode.h
123         ${INSTALL} -d ${DESTDIR}${afssrvbindir}
124         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
125         ${INSTALL} -d ${DESTDIR}${bindir}
126         ${INSTALL} -d ${DESTDIR}${includedir}/afs
127         ${INSTALL} -d ${DESTDIR}${libdir}/afs
128         ${INSTALL_PROGRAM} bosserver ${DESTDIR}${afssrvsbindir}/bosserver
129         ${INSTALL_DATA} bosint.h ${DESTDIR}${includedir}/afs/bosint.h
130         ${INSTALL_PROGRAM} bos ${DESTDIR}${bindir}/bos
131         ${INSTALL_PROGRAM} bos ${DESTDIR}${afssrvbindir}/bos
132         ${INSTALL_PROGRAM} bos_util ${DESTDIR}${afssrvsbindir}/bos_util
133         ${INSTALL_DATA} libbos.a ${DESTDIR}${libdir}/afs/libbos.a
134         ${INSTALL_DATA} bnode.h ${DESTDIR}${includedir}/afs/bnode.h
135
136 dest: bosserver bos bos_util libbos.a bosint.h bnode.h
137         ${INSTALL} -d ${DEST}/bin
138         ${INSTALL} -d ${DEST}/include/afs
139         ${INSTALL} -d ${DEST}/lib/afs
140         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
141         ${INSTALL_PROGRAM} bosserver ${DEST}/root.server/usr/afs/bin/bosserver
142         ${INSTALL_DATA} bosint.h ${DEST}/include/afs/bosint.h
143         ${INSTALL_PROGRAM} bos ${DEST}/bin/bos
144         ${INSTALL_PROGRAM} bos ${DEST}/root.server/usr/afs/bin/bos
145         ${INSTALL_PROGRAM} bos_util ${DEST}/root.server/usr/afs/bin/bos_util
146         ${INSTALL_DATA} libbos.a ${DEST}/lib/afs/libbos.a
147         ${INSTALL_DATA} bnode.h ${DEST}/include/afs/bnode.h
148
149 #
150 # Misc. targets
151 #
152 clean:
153         $(RM) -f  *.a *.o bos bosserver testproc bos_util \
154                 bosint.cs.c bosint.ss.c bosint.xdr.c bosint.h \
155                 core boserr.c bnode.h AFS_component_version_number.c 
156
157 test: 
158         cd test; $(MAKE) 
159
160 include ../config/Makefile.version
161