SRC=$(wildcard *.cpp)
EXE=$(addsuffix .exe, $(basename $(SRC)))
CPPC=g++ -std=c++14
CPPC_FLAGS=-Wall -Wextra -pedantic -O3

all : this
	cd hand && $(MAKE)

this : $(EXE) 
	./f.exe 5 >f.out
	./fg.exe 5 >fg.out
	./fgh.exe 5 >fgh.out

%.exe : %.cpp f.h
	$(CPPC) $(CPPC_FLAGS) $< -o $@

clean :
	rm -f $(EXE) *.out
	cd hand && $(MAKE) clean

.PHONY: all this clean

