DEFINES = `sh /usr/bin/libnet-config --defines`
LIBS = `sh /usr/bin/libnet-config --libs`
LIBNET_PATH = /usr/lib/libnet.a
CC = cc

snot: snot_main.o snot_parse_rules.o snot_send_packets.o
	$(CC) $(DEFINES) $(LIBS) -o snot snot_main.c snot_parse_rules.o snot_send_packets.o $(LIBNET_PATH) $(LIBS)

snot_parse_rules.o: snot_parse_rules.c snot_main.o
	$(CC) $(DEFINES) -c -o snot_parse_rules.o snot_parse_rules.c

snot_send_packets.o: snot_send_packets.c snot_main.o
	$(CC) $(DEFINES) -c -o snot_send_packets.o snot_send_packets.c

snot_main.o: snot_main.c
	$(CC) $(DEFINES) -c -o snot_main.o snot_main.c

clean:
	rm *.o snot

unixify:
	sh tr.sh
