#
#	Makefile for KA9Q TCP/IP package for Linux
#

CC = gcc

#
# Add -DXOBBS to the CFLAGS line of choice if you wish to include the W2XO
# PBBS code for sysV Unix... and add -DSID2 if you want a separate 
# 'ax25 bbscall' callsign/ssid for the BBS port.
#
# Add -DDEBUG if you want general debugging code included, and add
# -DLINUX_DEBUG if you want IO tracing done.
#
# If your machine is little endian (PCs, VAXs) then add -DLITTLE_ENDIAN
# otherwise the checksums of TCP, UDP and IP will be wrong.
#
# The MSPTICK value is the number of ms per clock tick. The code uses the
# return from the times system call for the value. On Linux this is in jiffies
# of which there are 100 per second, ie 10ms per jiffy. I think I'm right.
#

CFLAGS = -O2 -traditional -DMSPTICK=10 -DLITTLE_ENDIAN
LIBS =

SRCS =	main.c arp.c arpcmd.c arpdump.c ax25.c ax25cmd.c \
	ax25dump.c ax25subr.c ax25user.c ax_mbx.c cmdparse.c daemon.c \
	files.c fingcli.c fingserv.c ftp.c ftpcli.c ftpserv.c icmp.c \
	icmpcmd.c icmpdump.c icmpmsg.c iface.c ip.c ipcmd.c ipdump.c \
	iproute.c kiss.c lapb.c lapbtime.c lcsum.c mbuf.c misc.c mulport.c \
	netuser.c nrcmd.c nrs.c nr3.c nrsubr.c nr4.c nr4subr.c \
	nr4user.c nr4timer.c pathname.c session.c slip.c smisc.c \
	smtpcli.c smtpserv.c linux_io.c linux.c tcpcmd.c tcpdump.c \
	tcpin.c tcpout.c tcpsubr.c tcptimer.c tcpuser.c telnet.c \
	telunix.c timer.c tnserv.c trace.c ttydriv.c udp.c udpcmd.c \
	udpdump.c version.c wildmat.c

OBJS =	main.o arp.o arpcmd.o arpdump.o ax25.o ax25cmd.o \
	ax25dump.o ax25subr.o ax25user.o ax_mbx.o cmdparse.o daemon.o \
	files.o fingcli.o fingserv.o ftp.o ftpcli.o ftpserv.o icmp.o \
	icmpcmd.o icmpdump.o icmpmsg.o iface.o ip.o ipcmd.o ipdump.o \
	iproute.o kiss.o lapb.o lapbtime.o lcsum.o mbuf.o misc.o mulport.o \
	netuser.o nrcmd.o nrs.o nr3.o nrsubr.o nr4.o nr4subr.o \
	nr4user.o nr4timer.o pathname.o session.o slip.o smisc.o \
	smtpcli.o smtpserv.o linux_io.o linux.o tcpcmd.o tcpdump.o \
	tcpin.o tcpout.o tcpsubr.o tcptimer.o tcpuser.o telnet.o \
	telunix.o timer.o tnserv.o trace.o ttydriv.o udp.o udpcmd.o \
	udpdump.o version.o wildmat.o

net:	$(OBJS)
	$(CC) $(CFLAGS) -o net $(OBJS) $(LIBS)

install:
	install -s -m 755 -o bin -g bin net	/usr/local/bin

depend:
	gcc -E -M *.c > depend

clean:
	rm -f *~ *.bak *.o net depend

include depend
