more-makefiles-cleanup-20010829
[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 DESTDIR=@DESTDIR@
9 SRCDIR=@SRCDIR@
10 TOP_SRCDIR=@TOP_SRCDIR@
11 SYS_NAME=@AFS_SYSNAME@
12
13 SHELL=/bin/sh
14
15 include ../config/Makefile.${SYS_NAME}
16
17 COMPILE_ET=${SRCDIR}/bin/compile_et
18 CFLAGS=-g -I${TOP_SRCDIR}/config -I${SRCDIR}/include ${XCFLAGS}
19 RPCINCLS=${SRCDIR}/include/lwp.h ${SRCDIR}/include/rx/rx.h bosint.h
20
21 INCLS=  bnode.h \
22         ${RPCINCLS} \
23         ${SRCDIR}/include/afs/auth.h \
24         ${SRCDIR}/include/afs/keys.h \
25         ${SRCDIR}/include/afs/cellconfig.h \
26         ${SRCDIR}/include/afs/cmd.h \
27         ${SRCDIR}/include/afs/ktime.h
28
29 # EH 12/18/90 - have to search librx.a twice on Ultrix 4.0
30 LIBS=   ${SRCDIR}/lib/librx.a \
31         ${SRCDIR}/lib/liblwp.a \
32         ${SRCDIR}/lib/afs/libcmd.a \
33         ${SRCDIR}/lib/afs/libkauth.a \
34         ${SRCDIR}/lib/afs/libvolser.a \
35         ${SRCDIR}/lib/afs/libvldb.a \
36         ${SRCDIR}/lib/afs/libauth.a \
37         ${SRCDIR}/lib/librxstat.a \
38         ${SRCDIR}/lib/librxkad.a \
39         ${SRCDIR}/lib/libdes.a \
40         ${SRCDIR}/lib/librx.a \
41         ${SRCDIR}/lib/libubik.a \
42         ${SRCDIR}/lib/afs/libcom_err.a \
43         ${SRCDIR}/lib/afs/util.a \
44         ${SRCDIR}/lib/afs/libsys.a \
45         ${SRCDIR}/lib/afs/libprocmgmt.a
46
47 OBJS=bosserver.o bnode.o ezbnodeops.o fsbnodeops.o bosint.ss.o bosint.xdr.o \
48 bosoprocs.o cronbnodeops.o
49
50 all: install
51
52 $(OBJS) bosint.xdr.o bosint.cs.o boserr.o: $(INCLS)
53
54 bosint.ss.o: bosint.ss.c ${RPCINCLS}
55 bosint.xdr.o: bosint.xdr.c ${RPCINCLS}
56 bosint.cs.o: bosint.cs.c ${RPCINCLS}
57
58 bosint.xdr.c bosint.ss.c bosint.cs.c bosint.h: bosint.xg
59         ${SRCDIR}/bin/rxgen -x bosint.xg
60
61 bnode.h boserr.c: bnode.p.h boserr.et
62         $(RM) -f boserr.c bnode.h; $(COMPILE_ET) boserr -h bnode
63
64 bosserver.o: bosserver.c ${INCLS} AFS_component_version_number.o
65
66 cronbnodeops.o: cronbnodeops.c ${INCLS}
67
68 bnode.o: bnode.c ${INCLS}
69
70 bosoprocs.o: bosoprocs.c ${INCLS}
71
72 bos.o: bos.c ${INCLS} AFS_component_version_number.o
73
74 bos: bos.o $(LIBS) libbos.a
75         ${CC} ${CFLAGS} -o bos bos.o libbos.a $(LIBS)  ${XLIBS}
76
77 ezbnodeops.o: ezbnodeops.c ${INCLS}
78
79 fsbnodeops.o: fsbnodeops.c ${INCLS}
80
81 libbos.a: bosint.xdr.o bosint.cs.o boserr.o AFS_component_version_number.o
82         -$(RM) -f $@
83         $(AR) crv $@ bosint.xdr.o bosint.cs.o boserr.o AFS_component_version_number.o
84         $(RANLIB) $@
85
86 bosserver: $(OBJS) $(LIBS)
87         ${CC} $(CFLAGS) -o bosserver $(OBJS) ${SRCDIR}/lib/afs/libaudit.a $(LIBS)  ${XLIBS} 
88
89 #
90 # Install targets
91 #
92 install: ${DESTDIR}/root.server/usr/afs/bin/bosserver \
93         ${DESTDIR}/include/afs/bosint.h \
94         ${DESTDIR}/bin/bos \
95         ${DESTDIR}/root.server/usr/afs/bin/bos \
96         ${DESTDIR}/lib/afs/libbos.a \
97         ${DESTDIR}/include/afs/bnode.h
98
99 ${DESTDIR}/root.server/usr/afs/bin/bosserver: bosserver
100         ${INSTALL} $? $@
101
102 ${DESTDIR}/include/afs/bosint.h: bosint.h
103         ${INSTALL} $? $@
104
105 ${DESTDIR}/bin/bos: bos
106         ${INSTALL} $? $@
107
108 ${DESTDIR}/root.server/usr/afs/bin/bos: bos
109         ${INSTALL} $? $@
110
111 ${DESTDIR}/lib/afs/libbos.a: libbos.a
112         ${INSTALL} $? $@
113
114 ${DESTDIR}/include/afs/bnode.h: bnode.h
115         ${INSTALL} $? $@
116
117 #
118 # Misc. targets
119 #
120 clean:
121         $(RM) -f  *.a *.o bos bosserver testproc bosint.cs.c bosint.ss.c bosint.xdr.c \
122                 bosint.h core boserr.c bnode.h AFS_component_version_number.c
123
124 test: 
125         cd test; $(MAKE) 
126
127 include ../config/Makefile.version