.SUFFIXES: .c .a86 .b

LIB = ../../lib
INCLUDE = ../../include
OBJS = printf.b netinit.b netclose.b netstats.b net_utils.b
SRCS = printf.c netinit.c netclose.c netstats.c

install: net

net: ${OBJS}
	ar r ${LIB}/libnet.a ${OBJS}
	ranlib ${LIB}/libnet.a

netinit.b: ${INCLUDE}/custom.h ${INCLUDE}/netbuf.h ${INCLUDE}/types.h \
	${INCLUDE}/task.h ${INCLUDE}/q.h ${INCLUDE}/netq.h \
	${INCLUDE}/net.h ${INCLUDE}/stdio.h

netclose.b: ${INCLUDE}/net.h ${INCLUDE}/custom.h ${INCLUDE}/types.h \
	${INCLUDE}/task.h ${INCLUDE}/q.h ${INCLUDE}/netq.h \
	${INCLUDE}/stdio.h

q.b: ${INCLUDE}/q.h

netstats.b: ${INCLUDE}/netbuf.h ${INCLUDE}/net.h

lintlib:
	lint86 -Cnet netinit.c netclose.c netstats.c printf.c lint.c
	mv llib-lnet.ln ${LIB}

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

.a86.b:
	a86 $*
