tcpflowdump: tcpflowdump.o packet.o tcpip.o ethernet.o flow.o
	gcc -Wall -g -o tcpflowdump tcpflowdump.o tcpip.o ethernet.o flow.o \
	    packet.o -lpcap

tcpflowdump.o: tcpflowdump.c packet.h flow.h tcpip.h ethernet.h queue.h
	gcc -Wall -c -g -o tcpflowdump.o tcpflowdump.c

packet.o: packet.c packet.h queue.h
	gcc -Wall -c -g -o packet.o packet.c

tcpip.o: tcpip.c tcpip.h packet.h queue.h
	gcc -Wall -c -g -o tcpip.o tcpip.c

ethernet.o: ethernet.c ethernet.h packet.h queue.h
	gcc -Wall -c -g -o ethernet.o ethernet.c

flow.o: flow.c flow.h packet.h queue.h
	gcc -Wall -c -g -o flow.o flow.c

clean:
	rm -f *.o *.core tcpflowdump
