#   Makefile for NCSA Telnet and related applications.
#   This makefile is intended for use with Microsoft version of Make
#   and Microsoft C v 5.1
#
#cflags=/Fs /Zi /Od
#aflags=/L /Zi
#lflags=/CO
cflags=/Oalt /Gs
aflags=
lflags=

#
#  Tektronic routines.
#
rg0.obj : tek\rg0.c
        cl $(cflags) /AL /c tek\rg0.c

rge.obj : tek\rge.c
        cl $(cflags) /AL /DMSC /c tek\rge.c

rgh.obj : tek\rgh.c
        cl $(cflags) /AL /DMSC /c tek\rgh.c

rg9.obj : tek\rg9.c
        cl $(cflags) /AL /DMSC /c tek\rg9.c

rgp.obj : tek\rgp.c
        cl $(cflags) /AL /DMSC /c tek\rgp.c

rgc.obj : tek\rgc.c
        cl $(cflags) /AL /DMSC /c tek\rgc.c

rghp.obj : tek\rghp.c
        cl $(cflags) /AL /DMSC /c tek\rghp.c

rgep.obj : tek\rgep.c
        cl $(cflags) /AL /DMSC /c tek\rgep.c

vgtek.obj : tek\vgtek.c tek\vgtek.h tek\vgfont.h tek\tekstor.h
        cl  $(cflags) /AL /DMSC /c tek\vgtek.c

tekstor.obj : tek\tekstor.c tek\tekstor.h
        cl $(cflags) /AL /DMSC /c tek\tekstor.c

egaset.obj : tek\egaset.asm
        masm $(aflags) /DMicrosoft tek\egaset;

tek.lib : vgtek.obj tekstor.obj egaset.obj rgh.obj rge.obj rgp.obj rg0.obj \
  rg9.obj rgc.obj rghp.obj
        lib tek.lib -+vgtek -+tekstor -+egaset -+rgh -+rge -+ rgp -+rg0 -+rg9;
        lib tek.lib -+rgc -+rghp;

#
#  Virtual Screen routines
#
vsinterf.obj : vs\vsinterf.c vs\vsdata.h vs\vskeys.h vs\vsinit.h
        cl $(cflags) /AL /DMSC /c vs\vsinterf.c

vsem.obj : vs\vsem.c vs\vsdata.h vs\vskeys.h
        cl $(cflags) /AL /DMSC /c vs\vsem.c

vsintern.obj : vs\vsintern.c vs\vsdata.h vs\vskeys.h
        cl $(cflags) /AL /DMSC /c vs\vsintern.c

vs.lib : vsinterf.obj vsem.obj vsintern.obj
        lib vs.lib -+vsinterf -+vsem -+vsintern ;

#
# enet drivers
#
net523.obj : enet\net523.asm
        masm $(aflags) /DMicrosoft enet\net523;

net5210.obj : enet\net5210.asm
        masm $(aflags) /DMicrosoft enet\net5210;

netub.obj : enet\netub.asm
        masm $(aflags) /DMicrosoft enet\netub;

net3com.obj : enet\net3com.asm
        masm $(aflags) /DMicrosoft enet\net3com;

netzyp.obj : enet\netzyp.asm enet\zypdefs.inc
        masm $(aflags) /DMicrosoft /Ienet enet\netzyp;

net8003.obj : enet\net8003.asm enet\net8003.inc
        masm $(aflags) /DMicrosoft /Ienet enet\net8003;

net8003A.obj : enet\net8003A.asm enet\net8003.inc
        masm $(aflags) /DMicrosoft /Ienet enet\net8003A;

net501.obj : enet\net501.asm
        masm $(aflags) /DMicrosoft enet\net501;

#
#  Telbin
#

ip.obj : ip.c protocol.h data.h
        cl $(cflags) /AL /DMSC /c ip.c

user.obj : user.c protocol.h data.h
        cl $(cflags) /AL /DMSC /c user.c

rspc.obj : rspc.c windat.h whatami.h nkeys.h vs\vskeys.h
        cl $(cflags) /AL /DMSC /Ivs /c rspc.c

dlayer.obj : dlayer.c protocol.h data.h
        cl $(cflags) /AL /DMSC /c dlayer.c

tools.obj : tools.c protocol.h data.h
        cl $(cflags) /AL /DMSC /c tools.c

bkgr.obj : bkgr.c whatami.h hostform.h
        cl $(cflags) /AL /DMSC /c bkgr.c

util.obj : util.c whatami.h hostform.h
        cl $(cflags) /AL /DMSC /c util.c

pctools.obj : pctools.c protocol.h data.h
        cl $(cflags) /AL /DMSC /c pctools.c

tcp.obj : tcp.c protocol.h data.h
        cl $(cflags) /AL /DMSC /c tcp.c

pcutil.obj : pcutil.c whatami.h
        cl $(cflags) /AL /DMSC /c pcutil.c

protinit.obj : protinit.c protocol.h data.h
        cl $(cflags) /AL /DMSC /c protinit.c

look.obj : look.c windat.h whatami.h nkeys.h hostform.h
        cl $(cflags) /AL /DMSC /c look.c

confile.obj : confile.c whatami.h hostform.h
        cl $(cflags) /AL /DMSC /c confile.c

ipasm.obj : ipasm.asm
        masm $(aflags) /DMicrosoft ipasm;

ncsaio.obj : ncsaio.asm
        masm $(aflags) /DMicrosoft ncsaio;

tcp.lib : tcp.obj ip.obj dlayer.obj tools.obj pctools.obj protinit.obj user.obj ipasm.obj \
   net3com.obj net501.obj net523.obj net8003.obj net8003A.obj net5210.obj netub.obj netzyp.obj
        lib tcp.lib -+tcp -+ip -+dlayer -+tools -+pctools -+protinit -+user -+ipasm;
        lib tcp.lib -+net3com -+net501 -+net523 -+net8003 -+net8003a -+net5210 -+netub -+netzyp;

sess.lib : util.obj pcutil.obj bkgr.obj  confile.obj
        lib sess.lib -+util -+pcutil -+bkgr -+confile;

telbin.exe : look.obj ncsaio.obj rspc.obj tek.lib sess.lib tcp.lib vs.lib
        link /stack:4096 $(lflags) look+ncsaio+rspc,telbin,nul,tek+tcp+sess+vs ;

telpass.obj : telpass.c
        cl $(cflags) /AL /DMSC /c telpass.c

telpass.exe : telpass.obj  ncsaio.obj
        link $(lflags) telpass+ncsaio,telpass,nul ;

minitel.obj : minitel.c whatami.h hostform.h
        cl $(cflags) /AL /DMSC /c minitel.c

minitel.exe : minitel.obj ncsaio.obj tcp.lib sess.lib
        link $(lflags) minitel+ncsaio,minitel,nul,tcp+sess ;

#
# ftpbin
#
ftpbin.obj : ftp\ftpbin.c nkeys.h  hostform.h whatami.h ftp\ftppi.h
        cl $(flags) /AL /DMSC /c /I. ftp/ftpbin.c

ftpbin.exe : ftpbin.obj ncsaio.obj tcp.lib sess.lib
        link $(lflags) ftpbin+ncsaio,ftpbin,nul,tcp+sess ;

#
# finger
#
finger.obj : finger.c whatami.h hostform.h
        cl $(cflags) /AL /DMSC /c finger.c

finger.exe : finger.obj ncsaio.obj  tcp.lib sess.lib
        link $(lflags) finger+ncsaio,finger,nul,tcp+sess ;
