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