#
#       Makefile for WatTCP TCP/IP kernal
#
# switches:
#	define the ones you want in the CFLAGS definition...
#
#	TRACE		- turn on tracing/debugging code
#       SKIPINI         - bootp/dhcp only, no WATTCP.CFG (size critical apps)
#       ETH_MSS         - you might set =576 for serial use (EPPPD), mostly
#                          useful if lacking CFG file (SKIPINI, etc)
#       TW_TO           - set between 30 and 240 for an RFC-compliant
#                          TIME_WAIT period (defaults to 2, higher can delay
#                          sock_wait_closed() much longer)
#
DEBUGS= -v

# 'obsolete function' warning can be safely ignored.  There should be
#  no other warnings at the default warning level under bcc3.1 and 4.x;
#  let's keep it that way :)

CFLAGS= $(DEBUGS) -DMSDOS -DETH_MSS=576 -I.\inc
MODELS=-ms
MODELL=-ml
MODELH=-mh

# Assembler flags
AFLAGS=-mx -t -i.\elib
AMODELS=-dFUNC_L=0
AMODELL=-dFUNC_L=1

# Define PC-specific include file

# old pre-BC4
#       bcc -c $(MODELS) $(CFLAGS) $*.c > errout

.c.obj:
        bcc -c $(MODELL) $(CFLAGS) $*.c
        tlib ..\lib\ertostcp -+$*

.asm.obj:
        tasm $(AFLAGS) $(AMODELL) $*;
        tlib ..\lib\ertostcp -+$*


objs =pcpkt.obj pctcp.obj pcarp.obj pcsed.obj pcicmp.obj pcping.obj asmpkt.obj \
        sock_prn.obj sock_ini.obj pcbsd.obj pcrecv.obj \
        udp_nds.obj udp_dom.obj pcconfig.obj pc_cbrk.obj pcbuf.obj \
        pcbootp.obj sock_dbu.obj pcdbug.obj test.obj pcintr.obj pcstat.obj \
        bsdname.obj fragment.obj \
        netback.obj select.obj

..\lib\ertostcp.lib: $(objs)
        echo done

fragment.obj: fragment.c .\inc\wattcp.h
select.obj: select.c .\inc\wattcp.h
pcicmp.obj: pcicmp.c .\inc\wattcp.h
pcpkt.obj: pcpkt.c .\inc\wattcp.h
pctcp.obj: pctcp.c .\inc\wattcp.h
pcarp.obj: pcarp.c .\inc\wattcp.h
pcping.obj: pcping.c .\inc\wattcp.h
pcsed.obj: pcsed.c .\inc\wattcp.h .\inc\ethdev.h
sock_prn.obj: sock_prn.c .\inc\wattcp.h
sock_ini.obj: sock_ini.c .\inc\wattcp.h
udp_nds.obj: udp_nds.c .\inc\wattcp.h
udp_dom.obj: udp_dom.c .\inc\wattcp.h
pcconfig.obj: pcconfig.c .\inc\wattcp.h
pc_cbrk.obj: pc_cbrk.c .\inc\wattcp.h
sock_dbu.obj: sock_dbu.c .\inc\wattcp.h
pcbsd.obj: pcbsd.c .\inc\tcp.h .\inc\wattcp.h
pcbuf.obj: pcbuf.c .\inc\wattcp.h
pcbootp.obj: pcbootp.c .\inc\wattcp.h .\inc\bootp.h
pcrecv.obj: pcrecv.c .\inc\wattcp.h
asmpkt.obj: asmpkt.asm
pcdbug.obj: pcdbug.c .\inc\wattcp.h
test.obj : test.c .\inc\wattcp.h
pcintr.obj: pcintr.c .\inc\wattcp.h .\inc\elib.h
pcstat.obj: pcstat.c .\inc\wattcp.h
netback.obj: netback.c .\inc\elib.h .\inc\tcp.h
bsdname.obj: bsdname.c .\inc\wattcp.h
showsock.obj : showsock.c .\inc\wattcp.h
