#
# This is the makefile for the tcplib library. 
# It may be called on its own to just create and install this library,
# or it may be called from above by the master makefile.
#

# First we include the general definitions
!include "..\..\gendefs"

# The tcplib library and its dependancies

TCPLIB		= $(LIBDIR)\tcp.lib
3270TCPLIB	= $(3270LIBDIR)\tcp.lib
TCPLIB_SRC	= tcp.c user.c pctools.c tools.c ip.c ipasm.asm
TCPLIB_OBJ	= tcp.obj user.obj pctools.obj tools.obj ip.obj ipasm.obj

all: $(TCPLIB)

clean:
	-del *.obj
	-del $(TCPLIB)
	-del $(3270TCPLIB)

$(TCPLIB): $(TCPLIB_OBJ)

.c.obj:
	$(CC) $(CCOPTS) {$*.c }
	&$(LIB) $(TCPLIB) $(LIBFLAGS) $*
	$(CC) $(CCOPTS) $(3270FLAGS) {$*.c }
	&$(LIB) $(3270TCPLIB) $(LIBFLAGS) $*

.asm.obj:
	$(ASM) {$(AFLAGS) $*.asm }
	&$(LIB) $(TCPLIB) $(LIBFLAGS) $*
	$(ASM) {$(AFLAGS) $(3270FLAGS) $*.asm }
	&$(LIB) $(3270TCPLIB) $(LIBFLAGS) $*


