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