#
# This is the makefile for the teklib 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 teklib library and its dependancies
TEKLIB		= $(LIBDIR)\tek.lib
3270TEKLIB	= $(3270LIBDIR)\tek.lib
TEKLIB_SRC	= egaset.asm rg0.c rg9.c rgc.c rge.c rgh.c rghp.c \
		  rgp.c rgv.c tekstor.c vgtek.c
TEKLIB_OBJ	= egaset.obj rg0.obj rg9.obj rgc.obj rge.obj rgh.obj \
		  rghp.obj rgp.obj rgv.obj tekstor.obj vgtek.obj

all: $(TEKLIB)

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

$(TEKLIB): $(TEKLIB_OBJ)

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

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