all: f.exe fd.exe 
	./f.exe 10 100 >f.out
	./fd.exe 10 100 >fd.out
	cd dco&&$(MAKE);
	cd hand&&$(MAKE);
	diff dco/ga1s.out hand/f_a.out
	diff fd.out dco/ga1s.out 

f.exe : diffusion.h gauss.h 
fd.exe : diffusion.h gauss.h 

%.exe : %.cpp 
	g++ -Wall -Wextra -pedantic -std=c++14 -O3 -I .. $< -o$@

clean :
	cd dco&&$(MAKE) clean;
	cd hand&&$(MAKE) clean;
	rm -f *.exe *.out 

.PHONY: all clean 
