.c.o:
	lc -ilettuce:h -c $(CFLAGS) $<
#
#	Makefile for KA9Q TCP/IP package for PC clones with Aztec C
#
# switches:
#	define the ones you want in the CFLAGS definition...
#
#	TRACE		- turn on tracing/debugging code
#	SERVERS		- include code for application servers
#	AMIGA		- include Amiga specific code
#	MSDOS		- include Messy-Dos specific code
#	ETHER		- include ethernet specific code
#	UNIX		- Use UNIX file format conventions
#	CPM		- Use CP/M file format conventions
#	WINDOWIO	- use AMIGA windowio instead of standard IO
#
# Hardware driver flags:
#
#	SLIP		- include serial line IP stuff
#	PC_EC		- include 3Com Ethernet board driver for IBM-PC
#	AX25		- include AX.25 stuff
#	HAPN		- include HAPN stuff
#	PC100		- include PC-100 board driver (incomplete ??)
#	NETROM		- pseudo driver, needs AX.25
#	AMIGADEVDRV	- include Amiga internet.device device driver support

#
# CFLAGS for typical Amiga installation
#
CFLAGS= -dAMIGA -dSERVERS -dTRACE -dSLIP -dAX25 -dETHER -dMSPTICK=100 \
-dNETROM -dLATTICE -dAMIGADEVDRV -dWINDOWIO
APPLFLAGS= -dAMIGA  -dTRACE -dLATTICE -dAMIGADEVDRV 

NETOBJS= ftpserv.o ftpcli.o ftp.o smtpserv.o smtpcli.o \
	telnet.o tnserv.o smisc.o \
	tcpuser.o tcptimer.o tcpout.o tcpin.o tcpsubr.o udp.o \
	ip.o iproute.o icmp.o \
	ax25.o arp.o slip.o ether.o netrom.o \
	timer.o ttydriv.o cmdparse.o  mbuf.o netuser.o misc.o


net: makefile amiga.o version.o main.o devstub.o amigadev.o  $(NETOBJS)
	-blink lib:c.o version.o,main.o,amiga.o,devstub.o amigadev.o\
$(NETOBJS) to ram:net lib lib:lc.lib,lib:amiga.lib
	copy ram:net net
	delete ram:net

telnetp: telnetp.o netuser.o 
	-blink lib:c.o telnetp.o netuser.o to ram:telnetp \
	lib lib:lc.lib,lib:amiga.lib
	copy ram:telnetp telnetp
telnetp.o:telnetp.c machdep.h
	lc -ilettuce:h -c $(APPLFLAGS)  -dWINDOWIO telnetp.c
newtelnetp: newtelnetp.o netuser.o 
	-blink lib:c.o newtelnetp.o netuser.o to ram:newtelnetp \
	lib lib:lc.lib,lib:amiga.lib
	copy ram:newtelnetp newtelnetp
	
newtelnetp.o:newtelnetp.c machdep.h
	lc -ilettuce:h -c $(APPLFLAGS)  -dWINDOWIO newtelnetp.c
clean:	
	delete #?.o
	delete net

arp.o: arp.c machdep.h mbuf.h timer.h iface.h ether.h ax25.h arp.h
amiga.o: amiga.c machdep.h 
amigadev.o: amigadev.c inetdev.h machdep.h timer.h mbuf.h netuser.h internet.h ip.h tcp.h
devstub.o: devstub.asm
ax25.o: ax25.c machdep.h mbuf.h iface.h timer.h arp.h slip.h ax25.h trace.h
netrom.o: netrom.c machdep.h mbuf.h iface.h timer.h netrom.h ax25.h trace.h
cmdparse.o: cmdparse.c machdep.h trace.h cmdparse.h
ether.o: ether.c machdep.h
ftp.o: ftp.c machdep.h mbuf.h netuser.h timer.h tcp.h ftp.h session.h
ftpcli.o: ftpcli.c machdep.h mbuf.h netuser.h icmp.h timer.h tcp.h ftp.h session.h cmdparse.h
ftpserv.o: ftpserv.c machdep.h mbuf.h netuser.h timer.h tcp.h ftp.h
icmp.o: icmp.c internet.h timer.h ip.h icmp.h mbuf.h
ip.o: ip.c machdep.h mbuf.h timer.h internet.h ip.h icmp.h iface.h
iproute.o: iproute.c machdep.h mbuf.h internet.h timer.h netuser.h ip.h icmp.h iface.h trace.h
main.o: main.c machdep.h mbuf.h netuser.h timer.h icmp.h iface.h ip.h tcp.h ftp.h telnet.h session.h cmdparse.h amiga.h trace.h
mbuf.o: mbuf.c machdep.h mbuf.h
netuser.o: netuser.c machdep.h netuser.h
slip.o: slip.c machdep.h mbuf.h iface.h slip.h amiga.h trace.h
smisc.o: smisc.c machdep.h mbuf.h netuser.h timer.h tcp.h
smtpcli.o: smtpcli.c machdep.h netuser.h mbuf.h timer.h tcp.h smtp.h
smtpserv.o: smtpserv.c machdep.h mbuf.h netuser.h timer.h tcp.h smtp.h
tcpin.o: tcpin.c machdep.h timer.h mbuf.h netuser.h internet.h tcp.h icmp.h
tcpout.o: tcpout.c machdep.h timer.h mbuf.h netuser.h internet.h tcp.h
tcpsubr.o: tcpsubr.c machdep.h timer.h mbuf.h netuser.h internet.h tcp.h
tcptimer.o: tcptimer.c machdep.h timer.h mbuf.h netuser.h internet.h ip.h tcp.h
tcpuser.o: tcpuser.c machdep.h timer.h mbuf.h netuser.h internet.h ip.h tcp.h
telnet.o: telnet.c machdep.h mbuf.h timer.h internet.h icmp.h netuser.h tcp.h telnet.h session.h
tnserv.o: tnserv.c machdep.h mbuf.h timer.h internet.h icmp.h netuser.h tcp.h telnet.h session.h
timer.o: timer.c machdep.h timer.h
ttydriv.o: ttydriv.c machdep.h
udp.o: udp.c machdep.h mbuf.h netuser.h udp.h internet.h
