CPP = g++
CPPFLAGS = -Wall -Wextra -pedantic -std=c++11 -I ../Src -c
CPPFLAGS = -O3 -std=c++11 -I ../Src -c
CPPLINK =  
%.o: %.cpp
	$(CPP) $(CPPFLAGS) -o $@ -c $<

# Use vpath patterns to pick up source files from
# other directories, e.g., set_precision, etc
#

vpath %.cpp ../Src
vpath %.h ../Src


executables = xlstatExample

all: $(executables)

xlstatExample: xlstatExactCoq.o xlstatExample.o
	$(CPP) $(CPPLINK) -o $@ $^

xlstatExactCoq.o: xlstatExactCoq.h

xlstatExample.o: xlstatExactCoq.o xlstatExactCoq.h

.PHONY: clean
clean: 
	# remove all files generated by the compiler
	# these are compiler dependent
	rm -f *.o *.d *.g90 *.mod *.gc*
	# remove all executables
	rm -f $(executables)
