Updated makefile and subroutines to work with gfortran on Titan