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