SRC=$(wildcard *.cpp)
EXE=$(addsuffix .exe, $(basename $(SRC)))
CPPC=g++ -std=c++14
CPPC_FLAGS=-Wall -Wextra -pedantic -O3
# adapt to your environment
EIGEN_DIR=/home/un110076/Software/Eigen

all : $(EXE)
	./f_t.exe 10 100 >f_t.out
	./f_a.exe 10 100 >f_a.out
	diff f_t.out f_a.out
	./f_a_edcp.exe 10 100 10 >f_a_edcp.out
	diff f_t.out f_a_edcp.out

%.exe : %.cpp
	$(CPPC) $(CPPC_FLAGS) -I$(EIGEN_DIR) -I.. $< -o $@

clean :
	rm -f $(EXE) *.out

.PHONY: all clean

