2008-12-31 14:41:21 +02:00
|
|
|
CC = gcc
|
2009-01-06 18:14:51 +02:00
|
|
|
CFLAGS = -Wall -O0 -g
|
2008-12-31 14:41:21 +02:00
|
|
|
LDFLAGS = -L/usr/lib -lpcap
|
2009-01-06 18:14:51 +02:00
|
|
|
INCLUDE = -Ilib
|
2008-12-31 14:41:21 +02:00
|
|
|
|
2009-01-06 18:14:51 +02:00
|
|
|
all: wrapper.o process.o translate_ip.o connections.o checksum.o if.o storage.o lib/jsw_rbtree.o
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) *.o lib/*.o -o wrapper
|
2008-12-31 14:41:21 +02:00
|
|
|
|
|
|
|
wrapper.o: wrapper.c wrapper.h
|
2009-01-06 18:14:51 +02:00
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c wrapper.c -o wrapper.o
|
2008-12-31 14:41:21 +02:00
|
|
|
|
|
|
|
process.o: process.c wrapper.h translate_ip.h
|
2009-01-06 18:14:51 +02:00
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c process.c -o process.o
|
2008-12-31 14:41:21 +02:00
|
|
|
|
|
|
|
translate_ip.o: translate_ip.c translate_ip.h wrapper.h
|
|
|
|
$(CC) $(CFLAGS) -c translate_ip.c -o translate_ip.o
|
|
|
|
|
|
|
|
connections.o: connections.c wrapper.h
|
|
|
|
$(CC) $(CFLAGS) -c connections.c -o connections.o
|
|
|
|
|
|
|
|
checksum.o: checksum.c
|
2009-01-06 18:14:51 +02:00
|
|
|
$(CC) $(CFLAGS) -c checksum.c -o checksum.o
|
2008-12-31 14:41:21 +02:00
|
|
|
|
2009-01-03 17:24:39 +02:00
|
|
|
if.o: if.c wrapper.h
|
|
|
|
$(CC) $(CFLAGS) -c if.c -o if.o
|
|
|
|
|
2009-01-06 18:14:51 +02:00
|
|
|
storage.o: storage.c storage.h
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c storage.c -o storage.o
|
|
|
|
|
|
|
|
# libraries
|
|
|
|
lib/jsw_rbtree.o: lib/jsw_rbtree.c lib/jsw_rbtree.h
|
|
|
|
$(CC) $(CFLAGS) -c lib/jsw_rbtree.c -o lib/jsw_rbtree.o
|
|
|
|
|
2008-12-31 14:41:21 +02:00
|
|
|
clean:
|
2009-01-06 18:14:51 +02:00
|
|
|
rm -f wrapper *.o lib/*.o
|