# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
# 
# This software has been released under the terms of the IBM Public
# License.  For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html

RELDIR=rx
!include ..\config\NTMakefile.$(SYS_NAME)

# RX has different strings for it's version number.
VERSFILE=RX_component_version_number
CML_PREFIX=rx_

!include ..\config\NTMakefile.version

{.}.c{$(OUT)}.obj:
    $(C2OBJ) $<

# Additional debugging flag for RX.
AFSDEV_AUXCDEFINES = -DMAKEDEBUGCALL
!IF ("$(AFSDEV_BUILDTYPE)" == "CHECKED")
AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DRXDEBUG -DRXDEBUG_PACKET -DRX_TRACK_PACKETS -DRX_REFCOUNT_CHECK
!ENDIF

LIBFILE = $(DESTDIR)\lib\afsrx.lib

# Object files by category.
XDROBJS = $(OUT)\xdr.obj $(OUT)\xdr_array.obj $(OUT)\xdr_arrayn.obj $(OUT)\xdr_float.obj $(OUT)\xdr_mem.obj \
	$(OUT)\xdr_rec.obj  $(OUT)\xdr_refernce.obj $(OUT)\xdr_rx.obj $(OUT)\xdr_update.obj \
	$(OUT)\xdr_afsuuid.obj $(OUT)\xdr_int64.obj $(OUT)\xdr_int32.obj $(OUT)\xdr_len.obj

RXOBJS = $(OUT)\rx_event.obj $(OUT)\rx_clock_nt.obj $(OUT)\rx_user.obj $(OUT)\rx_lwp.obj $(OUT)\rx.obj \
	$(OUT)\rx_null.obj $(OUT)\rx_globals.obj $(OUT)\rx_getaddr.obj $(OUT)\rx_misc.obj $(OUT)\rx_packet.obj \
	$(OUT)\rx_rdwr.obj $(OUT)\rx_trace.obj $(OUT)\rx_xmit_nt.obj $(OUT)\rx_conncache.obj

MULTIOBJS = $(OUT)\rx_multi.obj

LIBOBJS = $(RXOBJS) $(MULTIOBJS) $(XDROBJS)

INCFILEDIR = $(DESTDIR)\include\rx

INCFILES  = \
	$(INCFILEDIR)\rx.h \
	$(INCFILEDIR)\rx_packet.h \
	$(INCFILEDIR)\rx_user.h \
	$(INCFILEDIR)\rx_event.h \
	$(INCFILEDIR)\rx_queue.h \
	$(INCFILEDIR)\rx_globals.h \
	$(INCFILEDIR)\rx_clock.h \
	$(INCFILEDIR)\rx_misc.h \
	$(INCFILEDIR)\rx_multi.h \
	$(INCFILEDIR)\rx_null.h \
	$(INCFILEDIR)\rx_lwp.h \
	$(INCFILEDIR)\rx_pthread.h \
	$(INCFILEDIR)\rx_xmit_nt.h \
	$(INCFILEDIR)\xdr_prototypes.h \
	$(INCFILEDIR)\rx_prototypes.h \
	$(INCFILEDIR)\xdr.h

$(LIBOBJS): $(INCFILES)

$(MULTIOBJS):  rx_multi.h 

$(XDROBJS): xdr.h

$(LIBFILE): $(LIBOBJS)
	$(LIBARCH)

# Not yet
#rxdumptrace.exe: rx_trace.c

install_headers:  $(INCFILES)

install: install_headers $(LIBFILE)

install9x: install_headers $(LIBFILE)

clean::
	$(DEL) $(LIBFILE) $(INCFILES)

mkdir:
	
