#
# This is the makefile for the microtn program.
# It may be called on its own to just create and install these programs,
# or it may be called from above by the master makefile.
#

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

# The microtn program and its dependancies

MICROTN		= microtn.exe
MICROTN_SRC	= command.asm microtn.c mtn3270.c newkeys.c
MICROTN_OBJ	= command.obj microtn.obj mtn3270.obj newkeys.obj

STARTUP_CODE	= c0s
NEEDED_LIBS	= tcp sess enet over ncsa sys_dos ctlr ascii general\
		  api cs

all: $(MICROTN)

clean:
	-del $(MICROTN_OBJ) $(MICROTN)


$(MICROTN): $(MICROTN_OBJ) tlink.cfg
	$(LINK) $(STARTUP_CODE) $(MICROTN_OBJ),$(MICROTN),,$(NEEDED_LIBS)
	copy $(MICROTN) $(BINDIR)\$(MICROTN)

#
# I appologize to all for such cruftiness, but I couldn't think of
# any other way of dealing with both the ^%$%*&^ 128 character
# command line limit, and the need for paths to be dynamicly changed.
# JRM - 4/27/93
#
tlink.cfg:
	echo /L$(BCCLIBS);$(LIBDIR) >tlink.cfg

.c.obj:
	$(CC) $(CCOPTS) {$< }

.asm.obj:
	$(ASM) {$(AFLAGS) $<; }







