d9fea507fa88d898b3021f16ec00a61a5405f7a2
[openafs.git] / src / bozo / Makefile
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 SHELL=/bin/sh
9 COMPONENT=bozo
10 include ../config/Makefile.${SYS_NAME}
11
12 COMPILE_ET=$(SRCDIR)bin/compile_et
13 CFLAGS=-g -I${SRCDIR}include ${XCFLAGS}
14 RPCINCLS=${SRCDIR}include/lwp.h ${SRCDIR}include/rx/rx.h bosint.h
15 INCLS=bnode.h ${RPCINCLS} ${SRCDIR}include/afs/auth.h \
16      ${SRCDIR}include/afs/keys.h  ${SRCDIR}include/afs/cellconfig.h \
17      ${SRCDIR}include/afs/cmd.h ${SRCDIR}include/afs/ktime.h
18
19 auditlib=${SRCDIR}/lib/afs/libaudit.a
20
21 #have to search libauth.a twice to get error stuff done right.
22 # EH 12/18/90 - have to search librx.a twice on Ultrix 4.0
23 LIBS=${SRCDIR}lib/librx.a ${SRCDIR}lib/liblwp.a \
24      ${SRCDIR}lib/afs/libcmd.a ${SRCDIR}lib/afs/libkauth.a \
25      ${SRCDIR}lib/afs/libvolser.a \
26      ${SRCDIR}lib/afs/libvldb.a \
27      ${SRCDIR}lib/afs/libauth.a \
28      ${SRCDIR}lib/librxstat.a \
29      ${SRCDIR}lib/librxkad.a ${SRCDIR}lib/libdes.a \
30      ${SRCDIR}lib/librx.a \
31      ${SRCDIR}lib/libubik.a \
32      ${SRCDIR}lib/afs/libcom_err.a ${SRCDIR}lib/afs/util.a \
33      ${SRCDIR}lib/afs/libsys.a \
34      ${SRCDIR}lib/afs/libprocmgmt.a
35
36 OBJS=bosserver.o bnode.o ezbnodeops.o fsbnodeops.o bosint.ss.o bosint.xdr.o \
37 bosoprocs.o cronbnodeops.o
38
39 LIBOBJS=bosint.xdr.o bosint.cs.o boserr.o
40
41 include ../config/Makefile.version
42
43 noversion: install
44
45 all: bosserver bos libbos.a
46
47 $(OBJS) $(LIBOBJS): $(INCLS)
48
49 bosint.ss.o: bosint.ss.c ${RPCINCLS}
50 bosint.xdr.o: bosint.xdr.c ${RPCINCLS}
51 bosint.cs.o: bosint.cs.c ${RPCINCLS}
52
53 bosint.xdr.c bosint.ss.c bosint.cs.c bosint.h: bosint.xg
54         ${SRCDIR}bin/rxgen -x bosint.xg
55
56 bnode.h boserr.c: bnode.p.h boserr.et
57         rm -f boserr.c bnode.h; $(COMPILE_ET) boserr -h bnode
58
59 bosserver.o: bosserver.c ${INCLS} AFS_component_version_number.o
60
61 cronbnodeops.o: cronbnodeops.c ${INCLS}
62
63 bnode.o: bnode.c ${INCLS}
64
65 bosoprocs.o: bosoprocs.c ${INCLS}
66
67 bos.o: bos.c ${INCLS} AFS_component_version_number.o
68
69 bos: bos.o $(LIBS) libbos.a
70         ${CC} ${CFLAGS} -o bos bos.o libbos.a $(LIBS)  ${XLIBS}
71
72 ezbnodeops.o: ezbnodeops.c ${INCLS}
73
74 fsbnodeops.o: fsbnodeops.c ${INCLS}
75
76 libbos.a: $(LIBOBJS) AFS_component_version_number.o
77         -rm -f libbos.a
78         ${AR} r libbos.a ${LIBOBJS} AFS_component_version_number.o
79         $(RANLIB) libbos.a
80
81 bosserver: $(OBJS) $(LIBS)
82         ${CC} $(CFLAGS) -o bosserver $(OBJS) ${auditlib} $(LIBS)  ${XLIBS} 
83
84 system: install
85
86 install: all
87         ${INSTALL} bosserver ${DESTDIR}root.server/usr/afs/bin
88         ${INSTALL} bosint.h ${DESTDIR}include/afs/bosint.h
89         ${INSTALL} bos ${DESTDIR}bin
90         ${INSTALL} bos ${DESTDIR}root.server/usr/afs/bin
91         ${INSTALL} libbos.a ${DESTDIR}lib/afs/libbos.a
92         ${INSTALL} bnode.h ${DESTDIR}include/afs/bnode.h
93
94 clean:
95         rm -f  *.a *.o bos bosserver testproc bosint.cs.c bosint.ss.c bosint.xdr.c bosint.h core boserr.c bnode.h\
96         AFS_component_version_number.c
97
98 test: 
99         cd test; $(MAKE)