-.INTERMEDIATE: socket-sniff.o
-socket-sniff.o: CFLAGS = -Wall -I../htable -g
-socket-sniff.o: socket-sniff.c | ignores.i
+RRQLIBS = vector typing
+INCDIRS = $(addprefix -I../,$(RRQLIBS))
+$(foreach L,$(RRQLIBS),$(eval LDLIBS += -L../$L -lrrq$L))
+
+CFLAGS = -Wall $(INCDIRS)
+CFLAGS += -g -fmax-errors=1
+LDLIBS += -lm