1 # Copyright 2000, International Business Machines Corporation and others.
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
10 include @TOP_OBJDIR@/src/config/Makefile.config
12 INSTALL_DATA = @INSTALL_DATA@
13 INSTALL_PROGRAM = @INSTALL_PROGRAM@
14 INSTALL_SCRIPT = @INSTALL_SCRIPT@
15 HELPER_SPLINT=@HELPER_SPLINT@
17 CCRULE=${MT_CC} ${CFLAGS} ${MT_CFLAGS} -c $?
23 RXOBJS= rx_pthread.o rxkad_errs.o
25 UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
26 volparse.o flipbase64.o softsig.o hostparse.o snprintf.o pthread_glock.o
30 ${TOP_INCDIR}/lock.h \
31 ${TOP_INCDIR}/ubik.h \
34 ${TOP_INCDIR}/rx/rx.h \
35 ${TOP_INCDIR}/rx/xdr.h \
36 ${TOP_INCDIR}/rx/rxkad.h \
37 ${TOP_INCDIR}/afs/auth.h \
38 ${TOP_INCDIR}/afs/cellconfig.h \
39 ${TOP_INCDIR}/afs/com_err.h \
40 ${TOP_INCDIR}/afs/bubasics.h \
41 budb.h budb_client.h ${BUDB}/database.h
43 # library ordering defined by top level makefile
44 LIBS=${RXOBJS} ${UTILOBJS} \
45 ${TOP_LIBDIR}/libbubasics.a \
46 ${TOP_LIBDIR}/libubik_pthread.a \
47 ${TOP_LIBDIR}/libafsauthent.a \
48 ${TOP_LIBDIR}/libafsrpc.a \
49 ${TOP_LIBDIR}/libcmd.a \
50 ${TOP_LIBDIR}/libafsutil.a
52 COMMON_OBJS = database.o db_alloc.o db_dump.o db_hash.o struct_ops.o ol_verify.o
54 SERVER_OBJS = ${COMMON_OBJS} budb.ss.o budb.xdr.o dbs_dump.o db_lock.o db_text.o \
55 procs.o server.o budb_errs.o
57 all: ${TOP_LIBDIR}/libbudb.a ${TOP_INCDIR}/afs/budb.h ${TOP_INCDIR}/afs/budb_errs.h ${TOP_INCDIR}/afs/budb_client.h budb_server ${INCLS}
60 # budb_errs.o actually depends on neither budb_client.h nor budb_errs.h
61 # but generating either of them will rebuild budb_errs.c
63 budb_errs.o: budb_errs.c budb_client.h budb_errs.h
65 budb_errs.c budb_client.h: ${BUDB}/budb_errs.et ${BUDB}/budb_client.p.h
66 $(RM) -f budb_client.h budb_errs.c; ${COMPILE_ET} -p ${BUDB} budb_errs -h budb_client
68 budb_errs.h: ${BUDB}/budb_errs.et
69 ${COMPILE_ET} -p ${BUDB} budb_errs
75 rx_pthread.o: ${RX}/rx_pthread.c
78 rxkad_errs.o: ../rxkad/rxkad_errs.c
81 # get the pthreaded util stuff compiled here. we do this instead of
82 # using the non-pthreaded libutil.a. There probably should be a
83 # pthreaded version of this library, as we are doing with ubik itself, but...
86 assert.o: ${UTIL}/assert.c
89 uuid.o: ${UTIL}/uuid.c
92 serverLog.o: ${UTIL}/serverLog.c
95 fileutil.o: ${UTIL}/fileutil.c
98 volparse.o: ${UTIL}/volparse.c
101 flipbase64.o: ${UTIL}/flipbase64.c
104 netutils.o: ${UTIL}/netutils.c
107 dirpath.o: ${UTIL}/dirpath.c
110 softsig.o: ${UTIL}/softsig.c
113 hostparse.o: ${UTIL}/hostparse.c
116 snprintf.o: ${UTIL}/snprintf.c
119 pthread_glock.o: ${UTIL}/pthread_glock.c
123 database.o: ${BUDB}/database.c
126 db_alloc.o: ${BUDB}/db_alloc.c
129 db_dump.o: ${BUDB}/db_dump.c
132 dbs_dump.o: ${BUDB}/dbs_dump.c
135 db_lock.o: ${BUDB}/db_lock.c
138 db_text.o: ${BUDB}/db_text.c
141 db_hash.o: ${BUDB}/db_hash.c
144 ol_verify.o: ${BUDB}/ol_verify.c
147 procs.o: ${BUDB}/procs.c
150 struct_ops.o: ${BUDB}/struct_ops.c
153 server.o: ${BUDB}/server.c
157 budb_server: $(SERVER_OBJS) ${LIBS}
158 ${CC} ${LDFLAGS} -o budb_server $(SERVER_OBJS) ${LIBS} ${MT_LIBS} ${XLIBS}
160 budb.cs.c: ${BUDB}/budb.rg
161 ${RXGEN} -u -C -o $@ ${BUDB}/budb.rg
163 budb.ss.c: ${BUDB}/budb.rg
164 ${RXGEN} -S -o $@ ${BUDB}/budb.rg
166 budb.xdr.c: ${BUDB}/budb.rg
167 ${RXGEN} -c -o $@ ${BUDB}/budb.rg
169 budb.h: ${BUDB}/budb.rg
170 ${RXGEN} -u -h -o $@ ${BUDB}/budb.rg
176 libbudb.a: budb_errs.o budb.cs.o budb.xdr.o struct_ops.o AFS_component_version_number.o
178 $(AR) crv $@ budb_errs.o budb.cs.o budb.xdr.o struct_ops.o AFS_component_version_number.o
185 ${DESTDIR}${afssrvlibexecdir}/buserver
187 ${DEST}/root.server/usr/afs/bin/buserver: budb_server
188 ${INSTALL_PROGRAM} $? $@
194 $(RM) -f *.o *~ budb_errs.[ch] budb.h budb_client.h *.a *.xdr.c \
195 *.ss.c *.cs.c core budb_server AFS_component_version_number.c
197 include ../config/Makefile.version
198 ${DESTDIR}${afssrvlibexecdir}/buserver: budb_server
199 ${INSTALL_PROGRAM} $? $@
202 ${DEST}/root.server/usr/afs/bin/buserver