/[MITgcm]/MITgcm/tools/genmake2
ViewVC logotype

Diff of /MITgcm/tools/genmake2

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.81 by cnh, Wed Jun 30 00:58:06 2004 UTC revision 1.84 by edhill, Mon Jul 12 15:49:08 2004 UTC
# Line 158  EOF Line 158  EOF
158  }  }
159    
160    
161  # Guess possible config options for this host  look_for_makedepend()  {
 find_possible_configs()  {  
   
     tmp1=`uname`"_"`uname -m`  
     tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`  
     tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'`  
     tmp1=`echo $tmp3 | sed -e 's|x86_64|amd64|'`  
     tmp2=`echo $tmp1 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'`  
     tmp3=`echo $tmp2 | sed -e 's/cray sv1/craysv1/'`  
     PLATFORM=$tmp3  
     echo $PLATFORM | grep cygwin > /dev/null 2>&1  &&  PLATFORM=cygwin_ia32  
     OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")`  
     echo "  The platform appears to be:  $PLATFORM"  
       
     echo "test" > test  
     ln -s ./test link  
     RETVAL=$?  
     if test "x${RETVAL}" = x0 ; then  
         LN="ln -s"  
     else  
         echo "Error: \"ln -s\" does not appear to work on this system!"  
         echo "  For help, please contact <MITgcm-support@mitgcm.org>."  
         exit 1  
     fi  
     rm -f test link  
   
     if test "x$CPP" = x ; then  
         CPP="cpp -traditional -P"  
     fi  
162    
163      #  The "original" makedepend is part of the Imake system that is      #  The "original" makedepend is part of the Imake system that is
164      #  most often distributed with XFree86 or with an XFree86 source      #  most often distributed with XFree86 or with an XFree86 source
# Line 242  EOF Line 214  EOF
214           rm -f ./genmake_cy_md           rm -f ./genmake_cy_md
215        fi        fi
216      fi      fi
217    }
218    
219    
220    # Guess possible config options for this host
221    find_possible_configs()  {
222    
223        tmp1=`uname`"_"`uname -m`
224        tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
225        tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'`
226        tmp1=`echo $tmp3 | sed -e 's|x86_64|amd64|'`
227        tmp2=`echo $tmp1 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'`
228        tmp3=`echo $tmp2 | sed -e 's/cray sv1/craysv1/'`
229        PLATFORM=$tmp3
230        echo $PLATFORM | grep cygwin > /dev/null 2>&1  &&  PLATFORM=cygwin_ia32
231        OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")`
232        echo "  The platform appears to be:  $PLATFORM"
233        
234        echo "test" > test
235        ln -s ./test link
236        RETVAL=$?
237        if test "x${RETVAL}" = x0 ; then
238            LN="ln -s"
239        else
240            echo "Error: \"ln -s\" does not appear to work on this system!"
241            echo "  For help, please contact <MITgcm-support@mitgcm.org>."
242            exit 1
243        fi
244        rm -f test link
245    
246        if test "x$CPP" = x ; then
247            CPP="cpp -traditional -P"
248        fi
249    
250        look_for_makedepend
251    
252      # look for possible fortran compilers      # look for possible fortran compilers
253      tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95"      tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95"
# Line 1085  EOF Line 1091  EOF
1091  else  else
1092      rm -f test_cpp      rm -f test_cpp
1093  fi  fi
1094  if test "x$MAKEDEPEND" = x ; then  look_for_makedepend
     MAKEDEPEND=makedepend  
 fi  
1095  if test "x$LN" = x ; then  if test "x$LN" = x ; then
1096      LN="ln -s"      LN="ln -s"
1097  fi  fi
# Line 1156  rm -f genmake_tcomp* Line 1160  rm -f genmake_tcomp*
1160  printf "  Do we have the etime() command using $FC...  "  printf "  Do we have the etime() command using $FC...  "
1161  cat > genmake_tcomp.f <<EOF  cat > genmake_tcomp.f <<EOF
1162        program hello        program hello
1163        REAL*4 TARRAY(2)        REAL*4 ACTUAL, TARRAY(2)
1164        call etime( tarray )        EXTERNAL ETIME
1165          REAL*4 ETIME
1166          actual = etime( tarray )
1167        print *, tarray        print *, tarray
1168        end        end
1169  EOF  EOF
# Line 1795  echo 'F90FILES =  $(F90SRCFILES:.F=.'$FS Line 1801  echo 'F90FILES =  $(F90SRCFILES:.F=.'$FS
1801  echo 'OBJFILES =  $(SRCFILES:.F=.o) $(CSRCFILES:.c=.o) $(F90SRCFILES:.F90=.o)' >> $MAKEFILE  echo 'OBJFILES =  $(SRCFILES:.F=.o) $(CSRCFILES:.c=.o) $(F90SRCFILES:.F90=.o)' >> $MAKEFILE
1802  echo >> $MAKEFILE  echo >> $MAKEFILE
1803  echo '.SUFFIXES:' >> $MAKEFILE  echo '.SUFFIXES:' >> $MAKEFILE
1804  echo '.SUFFIXES: .o .F .p .'$FS' .c .F90 .'$FS90 >> $MAKEFILE  echo '.SUFFIXES: .o .'$FS' .p .F .c .'$FS90' .F90' >> $MAKEFILE
1805  rm -f srclist.inc csrclist.inc hlist.inc flist.tmp clist.tmp f90srclist.inc  rm -f srclist.inc csrclist.inc hlist.inc flist.tmp clist.tmp f90srclist.inc
1806  rm -f ad_flow_files.inc  rm -f ad_flow_files.inc
1807    

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.84

  ViewVC Help
Powered by ViewVC 1.1.22