.SUFFIXES: .c .a86 .b

LIB = ../../lib
INCLUDE = ../../include
OBJS = tcp.b tcp_dump.b
SRCS = tcp.c tcp_dump.c
INCS =
ASMS =

LPR = impressify

tcp: ${OBJS}
	ar r ${LIB}/libtcp.a ${OBJS}
	ranlib ${LIB}/libtcp.a

${OBJS}: ${INCLUDE}/tcp.h ${INCLUDE}/timer.h ${INCLUDE}/netbuf.h \
	${INCLUDE}/net.h ${INCLUDE}/task.h ${INCLUDE}/netq.h ${INCLUDE}/q.h \
	${INCLUDE}/custom.h ${INCLUDE}/stdio.h ${INCLUDE}/types.h \
	${INCLUDE}/icmp.h ${INCLUDE}/ip.h

lintlib:
	lint86 -Ctcp tcp.c tcp_dump.c
	mv llib-ltcp.ln ${LIB}

print: ${SRCS} ${ASMS} ${INCS}
	${LPR} ${SRCS} ${ASMS} ${INCS}

.c.b:
	cc86 -c -DDEBUG $*.c

.a86.b:
	a86 $*
