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 TOP_SRCDIR=@TOP_SRCDIR@
11 SYS_NAME=@AFS_SYSNAME@
12 MKAFS_OSTYPE=@MKAFS_OSTYPE@
16 include ../config/Makefile.${SYS_NAME}
18 KERNELDIR = ../libafs/
19 UKERNELDIR = ../libuafs/
21 CFLAGS = ${OPTMZ} -I${TOP_SRCDIR}/config -I${SRCDIR}/include -DRXDEBUG ${XCFLAGS}
24 # Generic xdr objects (or, at least, xdr stuff that's not newly defined for rx).
25 # Really the xdr stuff should be in its own directory.
27 XDROBJS = xdr_arrayn.o xdr_rx.o xdr_afsuuid.o
29 RXOBJS = rx_clock.o rx_event.o rx_user.o rx_lwp.o rx.o rx_null.o rx_globals.o \
30 rx_getaddr.o rx_misc.o rx_packet.o rx_rdwr.o rx_trace.o rx_conncache.o \
33 MULTIOBJS = rx_multi.o
35 LIBOBJS = ${RXOBJS} ${MULTIOBJS} ${XDROBJS}
37 LIBOBJS_djgpp = ${RXOBJS_djgpp} ${MULTIOBJS} ${XDROBJS_djgpp}
39 XDROBJS_djgpp = xdr.o xdr_rec.o xdr_stdio.o \
40 xdr_float.o xdr_refernce.o xdr_update.o \
41 xdr_array.o xdr_mem.o xdr_rx.o xdr_afsuuid.o
43 RXOBJS_djgpp = rx_clock.o rx_event.o rx_user.o rx_lwp.o rx.o rx_null.o rx_globals.o \
44 rx_getaddr.o rx_misc.o rx_packet.o rx_rdwr.o rx_trace.o rx_conncache.o \
45 xdr_int64.o rx_xmit_nt.o
47 BASICINCLS = ${SRCDIR}/include/lwp.h ${SRCDIR}/include/lock.h \
48 rx_clock.h rx_queue.h rx_event.h
50 LIBS = librx.a ${SRCDIR}/lib/liblwp.a ${SRCDIR}/lib/afs/libcmd.a \
51 ${SRCDIR}/lib/afs/util.a
53 KSRCS = rx.c rx.h rx_clock.c rx_clock.h rx_event.c rx_event.h \
54 rx_globals.c rx_globals.h rx_kernel.h rx_misc.h \
55 rx_null.c rx_null.h rx_queue.h rx_getaddr.c rx_packet.c rx_packet.h \
56 rx_multi.h rx_kcommon.h rx_kcommon.c \
57 xdr.c xdr.h xdr_array.c xdr_arrayn.c xdr_rx.c rx_misc.c rx_rdwr.c \
58 xdr_afsuuid.c rx_trace.h xdr_int64.c
59 UKSRCS = $(KSRCS) rx_conncache.c
63 RX_component_version_number.c: AFS_component_version_number.c
64 sed 's/cml_version/rx_cml_version/' <AFS_component_version_number.c >RX_component_version_number.c
66 RX_component_version_number.o: RX_component_version_number.c
68 ${RXOBJS}: ${BASICINCLS} rx.h rx_user.h rx_globals.h
70 ${MULTIOBJS}: rx.h rx_multi.h
74 rx_user.o: rx.h rx_user.h
78 rx_packet.o: rx_packet.c rx_packet.h
80 rx_rdwr.o: rx_rdwr.c rx.h
86 rx_trace.o: rx_trace.h
88 rxdumptrace: rx_trace.c
90 $(CC) $(CFLAGS) -DDUMPTRACE -c -o rxdumptrace.o rx_trace.c
91 $(CC) $(CFLAGS) -o rxdumptrace rxdumptrace.o ${LIBS} ${XLIBS}
93 rx_getaddr.o: rx.h rx_getaddr.c
95 rx_globals.o: rx.h rx_user.h rx_globals.h
99 xdr_refernce.o: xdr_refernce.c xdr.h
101 librx.a: ${LIBOBJS} RX_component_version_number.o
103 $(AR) crv $@ ${LIBOBJS} RX_component_version_number.o
106 librx-djgpp.a: ${LIBOBJS_djgpp} RX_component_version_number.o
107 -$(RM) -f librx-djgpp.a
108 $(AR) crv librx-djgpp.a RX_component_version_number.o ${LIBOBJS_djgpp}
109 $(RANLIB) librx-djgpp.a
111 ${DESTDIR}/etc/rxdebug: rxdebug
112 ${INSTALL} rxdebug ${DESTDIR}/etc/rxdebug
114 rxdebug: rxdebug.o ${DESTDIR}/lib/afs/util.a ${DESTDIR}/lib/afs/libsys.a
115 ${CC} ${CFLAGS} -o $@ $@.o ${LIBS} ${SRCDIR}/lib/afs/libsys.a ${XLIBS}
120 install: includes kinstall ukinstall \
121 ${DESTDIR}/lib/librx.a
124 ${DESTDIR}/include/rx \
125 ${DESTDIR}/include/rx/rx_packet.h \
126 ${DESTDIR}/include/rx/rx.h \
127 ${DESTDIR}/include/rx/rx_user.h \
128 ${DESTDIR}/include/rx/rx_event.h \
129 ${DESTDIR}/include/rx/rx_queue.h \
130 ${DESTDIR}/include/rx/rx_globals.h \
131 ${DESTDIR}/include/rx/rx_clock.h \
132 ${DESTDIR}/include/rx/rx_multi.h \
133 ${DESTDIR}/include/rx/rx_pthread.h \
134 ${DESTDIR}/include/rx/rx_lwp.h \
135 ${DESTDIR}/include/rx/rx_misc.h \
136 ${DESTDIR}/include/rx/rx_null.h \
137 ${DESTDIR}/include/rx/xdr.h
139 kinstall: ${KERNELDIR}/rx
140 $(INSTALL) $(MKAFS_OSTYPE)/*.[ch] $(KERNELDIR)rx
141 $(INSTALL) $(KSRCS) $(KERNELDIR)rx
143 ukinstall: ${UKERNELDIR}/rx
144 $(INSTALL) $(UKSRCS) $(UKERNELDIR)rx
145 -$(INSTALL) UKERNEL/*.[ch] $(UKERNELDIR)rx
147 ${DESTDIR}/include/rx/rx_packet.h: rx_packet.h
150 ${DESTDIR}/include/rx/rx.h: rx.h
153 ${DESTDIR}/include/rx/rx_user.h: rx_user.h
156 ${DESTDIR}/include/rx/rx_event.h: rx_event.h
159 ${DESTDIR}/include/rx/rx_queue.h: rx_queue.h
162 ${DESTDIR}/include/rx/rx_globals.h: rx_globals.h
165 ${DESTDIR}/include/rx/rx_clock.h: rx_clock.h
168 ${DESTDIR}/include/rx/rx_multi.h: rx_multi.h
171 ${DESTDIR}/include/rx/rx_pthread.h: rx_pthread.h
174 ${DESTDIR}/include/rx/rx_lwp.h: rx_lwp.h
177 ${DESTDIR}/include/rx/rx_misc.h: rx_misc.h
180 ${DESTDIR}/include/rx/rx_null.h: rx_null.h
183 ${DESTDIR}/include/rx/xdr.h: xdr.h
187 mkdir -p ${UKERNELDIR}/rx
190 mkdir -p ${KERNELDIR}/rx
192 install-djgpp: includes kinstall ukinstall librx-djgpp ${DESTDIR}/include/rx/rx_xmit_nt.h ${DESTDIR}/lib/librx-djgpp.a
194 ${DESTDIR}/lib/librx.a: librx.a
197 # rule will never be satisfied
198 ${DESTDIR}/lib/librx-djgpp.a: librx-djgpp.a
199 ${INSTALL} $? ${DESTdIR}/lib/librx.a
201 ${DESTDIR}/include/rx:
202 mkdir -p ${DESTDIR}/include/rx
204 ${DESTDIR}/include/rx/rx_xmit_nt.h: rx_xmit_nt.h ${DESTDIR}/include/rx
211 $(RM) -f *.o *.a core *_component_version_number.c rxdumptrace rxdebug
213 include ../config/Makefile.version
215 test tests: install ${DESTDIR}/etc/rxdebug rxdumptrace