
PROGS=		tcpdstat
OBJS=	stat.o net_read.o ip_flow.o

SYS_DEFINES?=	-DINET6

CFLAGS=		-g -Wall
DEFINES=	$(SYS_DEFINES)
INCLUDES=	-I. $(SYS_INCLUDES)

all: $(PROGS)

install: $(PROGS)
	$(INSTALL) $(COPY) -m 0755 $(PROGS) $(PREFIX)/bin

tcpdstat: $(OBJS)
	$(CC) $(CFLAGS) $(INCLUDES) $(DEFINES) -o $@ $(OBJS) -lpcap -lm $(SYS_LIBS)

.c.o: 
	$(CC) $(CFLAGS) $(INCLUDES) $(DEFINES) -c $*.c

clean:;		-rm -f $(PROGS) *.o core *.core *.bak ,* *~ "#"*
