#   2000-01-11:
#   Makefile for WNOS for PC in DOS
#   with Borland C++
#   by ve3mrm
#
#   1995-02-16 (the last compilation by ?):
#	Makefile for KA9Q TCP/IP package for PC clones with Turbo C
#
# switches:
#	define the ones you want in the CFLAGS definition...
#
#	TRACE		- turn on tracing/debugging code
#
#	AMIGA		- include Amiga specific code
#	MSDOS		- include Messy-Dos specific code
#	UNIX		- Use UNIX file format conventions
#	CPM		- Use CP/M file format conventions
#
#.SWAP
#
#
# Assembler flags
#AFLAGS= -ml -q -t -DMEMMOD=LARGE
AFLAGS= /ut300 /ml /q /t /dMEMMOD=LARGE
#
all:	wnos.exe
#	pklite wnos.exe

# Define PC-specific include file
hardware.h: pc.h
	copy pc.h hardware.h

.c.obj:
		bcc -c $*.c

.asm.obj:
	tasm $(AFLAGS) $*;

sccvec.obj: sccvec.asm
	tasm $(AFLAGS) -DLARGEDATA $*;

spawn.obj: spawn.asm
	tasm $(AFLAGS) $*;

CLIENTS= telnet.obj ftpcli.obj finger.obj smtpcli.obj tip.obj pop2cli.obj \
		 nntpcli.obj domcli.obj rlogin.obj pop3cli.obj

SERVERS= ttylink.obj ftpserv.obj smisc.obj nntpserv.obj smtpserv.obj \
		 fingerd.obj mailbox.obj pop2serv.obj convers.obj domserv.obj pop3serv.obj

INTERNET= tcpcmd.obj tcpuser.obj tcptimer.obj tcpout.obj tcpin.obj \
		  tcpsubr.obj tcphdr.obj udpcmd.obj udp.obj udphdr.obj domsubr.obj \
		  ipcmd.obj ip.obj iproute.obj iphdr.obj icmpcmd.obj icmp.obj \
		  icmpmsg.obj icmphdr.obj arpcmd.obj arp.obj arphdr.obj netuser.obj \
		  nntpsubr.obj

AX25= ax25cmd.obj bmutil.obj ax25rout.obj axheard.obj forward.obj kiss.obj crc.obj

NETROM=	nrcmd.obj nr4user.obj nr4timer.obj nr4.obj nr4subr.obj nr4hdr.obj \
		nr3.obj nrs.obj nrhdr.obj

NET= ftpsubr.obj sockcmd.obj sockuser.obj socket.obj sockutil.obj asy.obj \
	 slip.obj iface.obj timer.obj ttydriv.obj cmdparse.obj mbuf.obj misc.obj \
	 pathname.obj audit.obj files.obj kernel.obj ksubr.obj alloc.obj \
		 getopt.obj lzw.obj wildmat.obj 

DUMP= trace.obj enetdump.obj arcdump.obj \
	  kissdump.obj ax25dump.obj flexdump.obj arpdump.obj nrdump.obj \
	  ipdump.obj icmpdump.obj udpdump.obj tcpdump.obj

PCOBJS= pc.obj dirutil.obj ec.obj pktdrvr.obj enet.obj \
		drsi.obj drsivec.obj z8530.obj 8250.obj \
		ecvec.obj pkvec.obj asyvec.obj \
		scc.obj sccvec.obj pcgen.obj sw.obj \
		vanessa.obj arcnet.obj cpuid.obj
#		vanessa.obj stopwatch.obj arcnet.obj cpuid.obj


mkdep.exe: mkdep.c
	bcc mkdep.c
	del mkdep.obj

wnos.exe: spawn.obj main.obj config.obj version.obj session.obj clients.lib servers.lib \
		 internet.lib net.lib netrom.lib ax25.lib pc.lib dump.lib
		bcc -ld -ewnos.exe spawn.obj main.obj config.obj version.obj session.obj *.lib

xref: spawn.obj main.obj config.obj version.obj session.obj clients.lib servers.lib \
		  internet.lib net.lib netrom.lib ax25.lib pc.lib dump.lib
		objxref /F /RU /RR /Oxref.out \
		h:\borlandc\lib\c0l.obj main.obj config.obj version.obj session.obj \
		*.lib h:\borlandc\lib\cl.lib

apptest.exe: apptest.obj appint.obj external.h
	bcc -ml -O -Z -M -y apptest.obj appint.obj

apptest.obj: apptest.c appint.h
	bcc -c -ml -O -Z -M -y apptest.c

appint.obj: appint.c external.h
	bcc -c -ml -O -Z -M -y appint.c

clients.lib: $(CLIENTS) clients.tl
	del clients.lib
	tlib /C clients.lib @clients.tl

servers.lib: $(SERVERS) servers.tl
	del servers.lib
	tlib /C servers.lib @servers.tl

internet.lib: $(INTERNET) internet.tl
	del internet.lib
	tlib /C internet.lib @internet.tl

ax25.lib: $(AX25) ax25.tl
	del ax25.lib
	tlib /C ax25.lib @ax25.tl

netrom.lib: $(NETROM) netrom.tl
	del netrom.lib
	tlib /C netrom.lib @netrom.tl

net.lib: $(NET) net.tl
	del net.lib
	tlib /C net.lib @net.tl

dump.lib: $(DUMP) dump.tl
	del dump.lib
	tlib /C dump.lib @dump.tl

pc.lib: $(PCOBJS) pc.tl
	del pc.lib
	tlib /C pc.lib @pc.tl

zip:
	pkzip -u -ex wn000111 makefile *.asm *.c *.h *.tl turboc.cfg tasm.cfg
#	arj a wnosobj *.obj *.lib

#zipup:
#	arj u wnossrc makefile *.asm *.c *.h *.tl turboc.cfg tasm.cfg
#	arj u wnosobj *.obj *.lib

clean:
	del *.lib
	del *.obj
	del wnos.exe
#	del *.map

#make begin says to start from the beginning.
begin: clean
	bcc -c *.c
	tasm $(AFLAGS) *.asm

# this section generated by mkdep
8250.obj: 8250.c global.h config.h mbuf.h proc.h iface.h asy.h pc.h slip.h 8250.h nrs.h
alloc.obj: alloc.c global.h proc.h cmdparse.h mbuf.h session.h files.h commands.h
arcdump.obj: arcdump.c global.h config.h mbuf.h arcnet.h trace.h
arcnet.obj: arcnet.c global.h config.h mbuf.h iface.h timer.h arp.h ip.h arcnet.h
arp.obj: arp.c global.h mbuf.h timer.h iface.h enet.h ax25.h icmp.h ip.h arp.h files.h
arpcmd.obj: arpcmd.c global.h mbuf.h timer.h enet.h ax25.h arp.h netuser.h cmdparse.h commands.h
arpdump.obj: arpdump.c global.h mbuf.h arp.h netuser.h trace.h
arpfconv.obj: arpfconv.c global.h
arphdr.obj: arphdr.c global.h mbuf.h arp.h
asy.obj: asy.c global.h config.h iface.h pktdrvr.h netuser.h asy.h 8250.h ax25.h kiss.h slip.h nrs.h proc.h commands.h
audit.obj: audit.c global.h mbuf.h
ax25cmd.obj: ax25cmd.c global.h config.h mbuf.h timer.h proc.h iface.h ax25.h cmdparse.h socket.h mailbox.h session.h tty.h nr4.h commands.h asy.h scc.h vanessa.h smtp.h
ax25dump.obj: ax25dump.c global.h config.h mbuf.h ax25.h timer.h trace.h socket.h
ax25rout.obj: ax25rout.c global.h config.h socket.h mbuf.h iface.h timer.h arp.h slip.h ax25.h netrom.h ip.h tcp.h trace.h files.h icmp.h
axheard.obj: axheard.c global.h mbuf.h iface.h ax25.h ip.h timer.h
bmutil.obj: bmutil.c global.h socket.h ftpserv.h smtp.h proc.h usock.h telnet.h session.h files.h bm.h mailbox.h
cmdparse.obj: cmdparse.c global.h proc.h cmdparse.h
config.obj: config.c hardware.h global.h mbuf.h proc.h cmdparse.h config.h daemon.h timer.h iface.h pktdrvr.h slip.h usock.h kiss.h enet.h ax25.h netrom.h nr4.h arp.h ip.h icmp.h tcp.h udp.h commands.h arcnet.h trace.h
convers.obj: convers.c global.h config.h mailbox.h netuser.h timer.h smtp.h cmdparse.h socket.h session.h files.h lzw.h
conversd.obj: conversd.c global.h config.h ax25.h
crc.obj: crc.c global.h mbuf.h crc.h
dirutil.obj: dirutil.c global.h dirutil.h commands.h files.h
domcli.obj: domcli.c global.h config.h domain.h socket.h netuser.h files.h cmdparse.h
domserv.obj: domserv.c global.h config.h socket.h domain.h files.h netuser.h iface.h
domsubr.obj: domsubr.c config.h global.h mbuf.h domain.h netuser.h socket.h files.h
drsi.obj: drsi.c global.h config.h mbuf.h iface.h pktdrvr.h netuser.h drsi.h ax25.h trace.h pc.h 8530.h
ec.obj: ec.c global.h config.h mbuf.h enet.h iface.h pktdrvr.h netuser.h ec.h timer.h arp.h trace.h pc.h
enet.obj: enet.c global.h config.h mbuf.h iface.h timer.h arp.h ip.h enet.h
enetdump.obj: enetdump.c global.h config.h mbuf.h enet.h trace.h
files.obj: files.c global.h config.h files.h socket.h
finger.obj: finger.c global.h mbuf.h socket.h session.h proc.h netuser.h commands.h tty.h
fingerd.obj: fingerd.c global.h files.h mbuf.h socket.h session.h proc.h dirutil.h commands.h mailbox.h
flexdump.obj: flexdump.c global.h config.h mbuf.h flexnet.h trace.h
forward.obj: forward.c global.h config.h bm.h mailbox.h smtp.h cmdparse.h proc.h socket.h timer.h usock.h netuser.h ax25.h netrom.h nntp.h nr4.h files.h
ftpcli.obj: ftpcli.c global.h mbuf.h session.h cmdparse.h proc.h tty.h socket.h ftp.h ftpcli.h commands.h netuser.h dirutil.h files.h
ftpserv.obj: ftpserv.c global.h mbuf.h socket.h ftp.h ftpserv.h proc.h dirutil.h commands.h
ftpsubr.obj: ftpsubr.c global.h mbuf.h socket.h proc.h ftp.h ftpcli.h
getopt.obj: getopt.c global.h
icmp.obj: icmp.c global.h mbuf.h timer.h iface.h ip.h icmp.h netuser.h
icmpcmd.obj: icmpcmd.c global.h icmp.h ip.h mbuf.h netuser.h internet.h timer.h socket.h proc.h session.h cmdparse.h commands.h tcp.h
icmpdump.obj: icmpdump.c global.h mbuf.h internet.h netuser.h icmp.h trace.h ip.h
icmphdr.obj: icmphdr.c global.h mbuf.h internet.h ip.h icmp.h
icmpmsg.obj: icmpmsg.c global.h
iface.obj: iface.c global.h config.h mbuf.h proc.h iface.h ip.h netuser.h ax25.h enet.h pktdrvr.h cmdparse.h commands.h 
ip.obj: ip.c global.h mbuf.h timer.h internet.h netuser.h iface.h pktdrvr.h ip.h icmp.h
ipcmd.obj: ipcmd.c global.h mbuf.h internet.h timer.h netuser.h iface.h ip.h cmdparse.h commands.h socket.h
ipdump.obj: ipdump.c global.h mbuf.h internet.h ip.h trace.h netuser.h
iphdr.obj: iphdr.c global.h mbuf.h ip.h internet.h
iproute.obj: iproute.c global.h mbuf.h iface.h timer.h internet.h ip.h netuser.h icmp.h trace.h pktdrvr.h files.h
kernel.obj: kernel.c global.h mbuf.h proc.h timer.h socket.h daemon.h hardware.h
kiss.obj: kiss.c global.h config.h mbuf.h iface.h kiss.h slip.h asy.h ax25.h 
kissdump.obj: kissdump.c global.h config.h mbuf.h kiss.h ax25.h trace.h ip.h
ksubr.obj: ksubr.c global.h proc.h pc.h commands.h
logfile.obj: logfile.c
lzw.obj: lzw.c global.h config.h mbuf.h proc.h lzw.h usock.h session.h cmdparse.h
mailbox.obj: mailbox.c global.h config.h bm.h timer.h mailbox.h cmdparse.h proc.h socket.h usock.h session.h ax25.h smtp.h dirutil.h telnet.h ftp.h ftpserv.h netrom.h commands.h netuser.h files.h
main.obj: main.c global.h config.h files.h mbuf.h socket.h iface.h ftpcli.h telnet.h remote.h session.h cmdparse.h ax25.h arp.h kiss.h enet.h timer.h proc.h tty.h daemon.h domain.h usock.h netrom.h ip.h tcp.h udp.h hardware.h commands.h asy.h trace.h scc.h vanessa.h 8250.h
mbuf.obj: mbuf.c global.h mbuf.h proc.h config.h
misc.obj: misc.c global.h socket.h mbuf.h
netuser.obj: netuser.c global.h netuser.h domain.h
nntpcli.obj: nntpcli.c global.h config.h nntp.h files.h domain.h socket.h cmdparse.h session.h lzw.h
nntpserv.obj: nntpserv.c global.h config.h nntp.h socket.h files.h ftp.h bm.h lzw.h
nntpsubr.obj: nntpsubr.c global.h nntp.h files.h socket.h
nr3.obj: nr3.c global.h config.h mbuf.h pktdrvr.h iface.h netuser.h timer.h arp.h slip.h ax25.h netrom.h nr4.h socket.h trace.h ip.h commands.h
nr4.obj: nr4.c global.h config.h mbuf.h timer.h ax25.h netrom.h nr4.h
nr4hdr.obj: nr4hdr.c global.h config.h mbuf.h nr4.h
nr4subr.obj: nr4subr.c global.h config.h mbuf.h timer.h ax25.h netrom.h nr4.h
nr4timer.obj: nr4timer.c global.h config.h mbuf.h timer.h ax25.h netrom.h nr4.h
nr4user.obj: nr4user.c global.h config.h mbuf.h timer.h ax25.h netrom.h nr4.h
nrcmd.obj: nrcmd.c global.h config.h mbuf.h ax25.h mailbox.h netrom.h nr4.h timer.h iface.h cmdparse.h session.h socket.h commands.h files.h
nrdump.obj: nrdump.c global.h config.h mbuf.h netrom.h nr4.h trace.h
nrhdr.obj: nrhdr.c global.h config.h mbuf.h timer.h ax25.h netrom.h
nrs.obj: nrs.c global.h config.h mbuf.h iface.h pktdrvr.h ax25.h nrs.h asy.h trace.h commands.h
pathname.obj: pathname.c global.h dirutil.h
pc.obj: pc.c global.h config.h mbuf.h socket.h internet.h iface.h cmdparse.h pc.h proc.h session.h smtp.h scc.h pktdrvr.h asy.h 8250.h domain.h
pktdrvr.obj: pktdrvr.c global.h config.h proc.h mbuf.h netuser.h enet.h arcnet.h ax25.h slip.h kiss.h iface.h ec.h arp.h trace.h pktdrvr.h
pop2cli.obj: pop2cli.c global.h mbuf.h cmdparse.h proc.h socket.h timer.h netuser.h dirutil.h files.h smtp.h
pop3cli.obj: pop3cli.c global.h mbuf.h cmdparse.h proc.h socket.h timer.h netuser.h dirutil.h files.h smtp.h
pop2serv.obj: pop2serv.c global.h config.h mbuf.h cmdparse.h socket.h proc.h files.h pop.h
pop3serv.obj: pop3serv.c global.h config.h mbuf.h cmdparse.h socket.h proc.h files.h pop.h
rlogin.obj: rlogin.c global.h mbuf.h socket.h session.h proc.h tty.h commands.h netuser.h
scc.obj: scc.c global.h config.h mbuf.h config.h netuser.h proc.h iface.h pktdrvr.h slip.h nrs.h 8250.h scc.h 8530.h 8536.h ax25.h trace.h pc.h kiss.h
session.obj: session.c global.h config.h mbuf.h proc.h ftpcli.h icmp.h telnet.h tty.h session.h hardware.h socket.h cmdparse.h commands.h files.h rlogin.h
slip.obj: slip.c global.h config.h mbuf.h iface.h config.h internet.h ip.h ax25.h slip.h asy.h trace.h
smisc.obj: smisc.c global.h mbuf.h proc.h socket.h remote.h hardware.h commands.h smtp.h tcp.h
smtpcli.obj: smtpcli.c global.h config.h cmdparse.h proc.h socket.h lzw.h timer.h netuser.h smtp.h dirutil.h commands.h session.h files.h
smtpserv.obj: smtpserv.c global.h config.h mbuf.h cmdparse.h socket.h lzw.h iface.h proc.h smtp.h commands.h dirutil.h mailbox.h bm.h nntp.h domain.h files.h
sockcmd.obj: sockcmd.c global.h config.h mbuf.h proc.h lzw.h usock.h socket.h ax25.h netrom.h tcp.h udp.h commands.h
socket.obj: socket.c global.h config.h mbuf.h netuser.h timer.h iface.h ip.h tcp.h udp.h ax25.h netrom.h nr4.h proc.h lzw.h usock.h socket.h
sockuser.obj: sockuser.c global.h config.h mbuf.h proc.h socket.h lzw.h usock.h session.h nr4.h
sockutil.obj: sockutil.c global.h mbuf.h netuser.h socket.h usock.h ax25.h tcp.h nr4.h config.h
sw.obj: sw.c global.h pc.h cmdparse.h
tcpcmd.obj: tcpcmd.c global.h timer.h mbuf.h netuser.h internet.h tcp.h cmdparse.h commands.h
tcpdump.obj: tcpdump.c global.h mbuf.h netuser.h internet.h tcp.h ip.h trace.h
tcphdr.obj: tcphdr.c global.h mbuf.h tcp.h ip.h internet.h
tcpin.obj: tcpin.c global.h timer.h mbuf.h netuser.h internet.h tcp.h icmp.h iface.h ip.h
tcpout.obj: tcpout.c global.h timer.h mbuf.h netuser.h internet.h tcp.h ip.h
tcpsubr.obj: tcpsubr.c global.h timer.h mbuf.h netuser.h internet.h tcp.h ip.h
tcptimer.obj: tcptimer.c global.h mbuf.h timer.h netuser.h internet.h tcp.h
tcpuser.obj: tcpuser.c global.h timer.h mbuf.h netuser.h socket.h internet.h tcp.h ip.h icmp.h proc.h
telnet.obj: telnet.c global.h config.h mbuf.h socket.h telnet.h session.h proc.h tty.h commands.h netuser.h
timer.obj: timer.c global.h timer.h proc.h mbuf.h commands.h daemon.h hardware.h socket.h
tip.obj: tip.c global.h config.h mbuf.h proc.h iface.h 8250.h asy.h tty.h session.h socket.h commands.h
trace.obj: trace.c global.h mbuf.h iface.h trace.h pktdrvr.h commands.h session.h files.h
ttydriv.obj: ttydriv.c global.h mbuf.h session.h tty.h socket.h
ttylink.obj: ttylink.c global.h mbuf.h socket.h telnet.h session.h proc.h tty.h mailbox.h commands.h cmdparse.h netuser.h
udp.obj: udp.c global.h mbuf.h netuser.h iface.h udp.h ip.h internet.h icmp.h
udpcmd.obj: udpcmd.c global.h mbuf.h netuser.h udp.h internet.h cmdparse.h commands.h
udpdump.obj: udpdump.c global.h mbuf.h netuser.h internet.h udp.h ip.h socket.h trace.h domain.h
udphdr.obj: udphdr.c global.h mbuf.h ip.h internet.h udp.h
vanessa.obj: vanessa.c global.h config.h proc.h commands.h mbuf.h ax25.h ip.h pktdrvr.h trace.h vanessa.h
version.obj: version.c
wildmat.obj: wildmat.c global.h

