# Makefile pro LNC
# Radek Hranicky - xhrani00@stud.fit.vutbr.cz

DIR=./src/
CC=g++
PRE=-std=c++98 -Wall -pedantic -W -lpcap

all:	lnc

.PHONY: clean doxygen

main.o: $(DIR)main.cpp $(DIR)main.h
	$(CC) $(PRE) -c $(DIR)main.cpp -o main.o

errors.o: $(DIR)errors.cpp $(DIR)errors.h
	$(CC) $(PRE) -c $(DIR)errors.cpp -o errors.o

config.o: $(DIR)config.cpp $(DIR)config.h
	$(CC) $(PRE) -c $(DIR)config.cpp -o config.o

packet.o: $(DIR)packet.cpp $(DIR)packet.h
	$(CC) $(PRE) -c $(DIR)packet.cpp -opacket.o

lnc: main.o errors.o config.o packet.o
	$(CC) $(PRE) main.o errors.o config.o packet.o -o lnc

clean:
	rm -f *~
	rm -f *.o
	rm -f lnc
	rm -rf doc/*

doxygen:
	doxygen doxyfile
