-include ../make.inc

ifeq ($(F90),)
all :
	@echo "Please run configure to set up build"
else
all : mod_unit.o poly.exe interp.exe specfunc.exe permutation.exe integration.exe \
	 sort.exe array.exe rng.exe histogram.exe
endif


INC=-I..
LIB=-L.. -lfgsl_$(F90) $(GSL_LIB)



run : all
	rm -f unit_debug
	./runtests.sh

mod_unit.o : mod_unit.f90
	$(F90) $(FPP) $(FFLAGS) -g -c -C $(INC) $^ 

%.exe : %.f90 mod_unit.o
	$(F90) $(FPP) $(FFLAGS) -g -C -o $@ $(INC) $< $(LIB) mod_unit.o

clean :
	rm -f *~ *.exe *.mod *.o *.dat
	rm -f unit_debug
