death-to-pinstall-20060801
[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 ${TOP_INCDIR}/afs/bosint.h: bosint.h
45         ${INSTALL_DATA} $? $@
46
47 ${TOP_INCDIR}/afs/bnode.h: bnode.h
48         ${INSTALL_DATA} $? $@
49
50 ${TOP_LIBDIR}/libbos.a: libbos.a
51         ${INSTALL_DATA} $? $@
52
53 $(OBJS) bosint.xdr.o bosint.cs.o boserr.o: $(INCLS)
54
55 bosint.ss.o: bosint.ss.c ${RPCINCLS}
56 bosint.xdr.o: bosint.xdr.c ${RPCINCLS}
57 bosint.cs.o: bosint.cs.c ${RPCINCLS}
58
59 bosint.cs.c: bosint.xg
60         ${RXGEN} -x -C -o $@ ${srcdir}/bosint.xg
61
62 bosint.ss.c: bosint.xg
63         ${RXGEN} -x -S -o $@ ${srcdir}/bosint.xg
64
65 bosint.xdr.c: bosint.xg
66         ${RXGEN} -x -c -o $@ ${srcdir}/bosint.xg
67
68 bosint.h: bosint.xg
69         ${RXGEN} -x -h -o $@ ${srcdir}/bosint.xg
70
71 bosint.cs.c: bosint.h
72 bosint.ss.c: bosint.h
73 bosint.xdr.c: bosint.h
74
75 bnode.h boserr.c: bnode.p.h boserr.et
76         $(RM) -f boserr.c bnode.h
77         ${COMPILE_ET} -p ${srcdir} boserr -h bnode
78
79 bosserver.o: bosserver.c ${INCLS} AFS_component_version_number.o
80
81 cronbnodeops.o: cronbnodeops.c ${INCLS}
82
83 bnode.o: bnode.c ${INCLS}
84
85 bosoprocs.o: bosoprocs.c ${INCLS}
86
87 bos.o: bos.c ${INCLS} AFS_component_version_number.o
88
89 bos: bos.o $(LIBS) libbos.a
90         ${CC} ${CFLAGS} -o bos bos.o libbos.a $(LIBS)  ${XLIBS}
91
92 bos_util.o: bos_util.c ${INCLS} AFS_component_version_number.o
93
94 bos_util: bos_util.o $(LIBS) 
95         ${CC} ${CFLAGS} -o bos_util bos_util.o $(LIBS)  ${XLIBS}
96
97 ezbnodeops.o: ezbnodeops.c ${INCLS}
98
99 fsbnodeops.o: fsbnodeops.c ${INCLS}
100
101 libbos.a: bosint.xdr.o bosint.cs.o boserr.o AFS_component_version_number.o
102         -$(RM) -f $@
103         $(AR) crv $@ bosint.xdr.o bosint.cs.o boserr.o AFS_component_version_number.o
104         $(RANLIB) $@
105
106 bosserver: $(OBJS) $(LIBS)
107         ${CC} $(CFLAGS) -o bosserver $(OBJS) ${TOP_LIBDIR}/libaudit.a $(LIBS)  ${XLIBS} 
108
109 #
110 # Install targets
111 #
112 install: bosserver bos bos_util libbos.a bosint.h bnode.h
113         ${INSTALL} -d ${DESTDIR}${afssrvbindir}
114         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
115         ${INSTALL} -d ${DESTDIR}${bindir}
116         ${INSTALL} -d ${DESTDIR}${includedir}/afs
117         ${INSTALL} -d ${DESTDIR}${libdir}/afs
118         ${INSTALL_PROGRAM} bosserver ${DESTDIR}${afssrvsbindir}/bosserver
119         ${INSTALL_DATA} bosint.h ${DESTDIR}${includedir}/afs/bosint.h
120         ${INSTALL_PROGRAM} bos ${DESTDIR}${bindir}/bos
121         ${INSTALL_PROGRAM} bos ${DESTDIR}${afssrvbindir}/bos
122         ${INSTALL_PROGRAM} bos_util ${DESTDIR}${afssrvsbindir}/bos_util
123         ${INSTALL_DATA} libbos.a ${DESTDIR}${libdir}/afs/libbos.a
124         ${INSTALL_DATA} bnode.h ${DESTDIR}${includedir}/afs/bnode.h
125
126 dest: bosserver bos bos_util libbos.a bosint.h bnode.h
127         ${INSTALL} -d ${DEST}/bin
128         ${INSTALL} -d ${DEST}/include/afs
129         ${INSTALL} -d ${DEST}/lib/afs
130         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
131         ${INSTALL_PROGRAM} bosserver ${DEST}/root.server/usr/afs/bin/bosserver
132         ${INSTALL_DATA} bosint.h ${DEST}/include/afs/bosint.h
133         ${INSTALL_PROGRAM} bos ${DEST}/bin/bos
134         ${INSTALL_PROGRAM} bos ${DEST}/root.server/usr/afs/bin/bos
135         ${INSTALL_PROGRAM} bos_util ${DEST}/root.server/usr/afs/bin/bos_util
136         ${INSTALL_DATA} libbos.a ${DEST}/lib/afs/libbos.a
137         ${INSTALL_DATA} bnode.h ${DEST}/include/afs/bnode.h
138
139 #
140 # Misc. targets
141 #
142 clean:
143         $(RM) -f  *.a *.o bos bosserver testproc bos_util \
144                 bosint.cs.c bosint.ss.c bosint.xdr.c bosint.h \
145                 core boserr.c bnode.h AFS_component_version_number.c 
146
147 test: 
148         cd test; $(MAKE) 
149
150 include ../config/Makefile.version
151