#
# This is the makefile for the sesslib 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 sesslib library and its dependancies

SESSLIB		= $(LIBDIR)\sess.lib
3270SESSLIB	= $(3270LIBDIR)\sess.lib
SESSLIB_SRC	= util.c events.c detect.asm
SESSLIB_OBJ	= util.obj events.obj detect.obj

all: $(SESSLIB)

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

$(SESSLIB): $(SESSLIB_OBJ)

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


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


