CIDIR=-I/usr/include/pcap


all: ipaudit total ipstrings

ipstrings: ipstrings.o
	$(CC) -o ../bin/ipstrings ipstrings.o -lpcap

total: total.o hash.o
	$(CC) -o ../bin/total total.o hash.o -lm

ipaudit: ipaudit.o hash.o
	$(CC) -o ../bin/ipaudit ipaudit.o hash.o -lpcap
   
ipaudit.o: ipaudit.c hash.h
	$(CC) -c ipaudit.c $(CIDIR) $(DFLAGS)

hash.o: hash.c hash.h
	$(CC) -c hash.c

total.o: total.c hash.c hash.h
	$(CC) -c total.c

ipstrings.o: ipstrings.c
	$(CC) -c ipstrings.c $(CIDIR) $(DFLAGS)

clean:
	rm -f *.o
	rm -f ../bin/ipaudit
	rm -f ../bin/total
	rm -f ../bin/ipstrings
