ALL	= rip.h routed.c query.c trace.c
INC	= /usr/include
CFLAGS	= -O -I${INC}
LIBC	=
LDFLAGS	= -n

all:	routed query trace

routed: routed.o af.o
	${CC} -o routed ${LDFLAGS} routed.o af.o -ljobs ${LIBC}

routed.o query.o: rip.h
routed.o af.o: router.h

query:	query.o
	${CC} -o query ${LDFLAGS} query.o ${LIBC}

trace:	trace.o
	${CC} -o trace ${LDFLAGS} trace.o ${LIBC}

install: routed trace query
	install -s routed /etc

lint:
	lint -hbxn routed.c af.c

clean:
	rm -f routed *.o core a.out t.c query linterrs trace typescript errs
