#!/usr/bin/make #main building variables DSRC = src/ DOBJ = Test_Driver/obj/ DMOD = Test_Driver/mod/ DEXE = Test_Driver/ LIBS = ifeq ("${FC}","") FC = gfortran endif ifeq ("${FC}","f77") # under OSX FC is set by default to the nonexistent f77 FC = gfortran endif # This should not only detect gfortran/f77, but also a GNU-based mpif90: DOGNU = $(shell ${FC} --version | grep -i GNU > /dev/null; expr 1 - $$?) OPTSC = -cpp -c -O2 ifeq ("$(DOGNU)", "1") OPTSC+=-J Test_Driver/mod/ -frealloc-lhs -ffree-line-length-none OPTSL+=-J Test_Driver/mod/ else OPTSC+=-module Test_Driver/mod/ -assume realloc_lhs OPTSL+=-module Test_Driver/mod/ endif VPATH = $(DSRC) $(DOBJ) $(DMOD) MKDIRS = $(DOBJ) $(DMOD) $(DEXE) LCEXES = $(shell echo $(EXES) | tr '[:upper:]' '[:lower:]') EXESPO = $(addsuffix .o,$(LCEXES)) EXESOBJ = $(addprefix $(DOBJ),$(EXESPO)) #auxiliary variables COTEXT = "Compiling $(