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