/[MITgcm]/MITgcm/tools/genmake
ViewVC logotype

Diff of /MITgcm/tools/genmake

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

revision 1.23 by adcroft, Fri Feb 2 21:36:30 2001 UTC revision 1.29 by adcroft, Thu Feb 8 18:00:24 2001 UTC
# Line 58  while ($#allargs) Line 58  while ($#allargs)
58     exit     exit
59     breaksw     breaksw
60   case -mods=*:   case -mods=*:
61     set MODS = ( $MODS `echo $arg | sed 's/-mods=//' | sed 's/,/ /' `)     set MODS = ( $MODS `echo $arg | sed 's/-mods=//' | sed 's/,/ /g' `)
62     breaksw     breaksw
63   case -disable:   case -disable:
64   case -disable=:   case -disable=:
# Line 67  while ($#allargs) Line 67  while ($#allargs)
67     exit     exit
68     breaksw     breaksw
69   case -disable=*:   case -disable=*:
70     set DISABLE = ( $DISABLE `echo $arg | sed 's/-disable=//' | sed 's/,/ /' `)     set DISABLE = ( $DISABLE `echo $arg | sed 's/-disable=//' | sed 's/,/ /g' `)
71     breaksw     breaksw
72   case -enable:   case -enable:
73   case -enable=:   case -enable=:
# Line 77  while ($#allargs) Line 77  while ($#allargs)
77     exit     exit
78     breaksw     breaksw
79   case -enable=*:   case -enable=*:
80     set ENABLE = ( $ENABLE `echo $arg | sed 's/-enable=//' | sed 's/,/ /' `)     set ENABLE = ( $ENABLE `echo $arg | sed 's/-enable=//' | sed 's/,/ /g' `)
81     breaksw     breaksw
82   case -mpi:   case -mpi:
83     echo "Enabling MPI options"     echo "Enabling MPI options"
# Line 118  echo Operating system: $mach Line 118  echo Operating system: $mach
118  # If -rootdir wasn't specified then assume script is being run from bin  # If -rootdir wasn't specified then assume script is being run from bin
119  # but if it was supplied then we should place the executable in the build dir  # but if it was supplied then we should place the executable in the build dir
120  if (! $?ROOTDIR) then  if (! $?ROOTDIR) then
121    set ROOTDIR = ( .. )    set pwd=`pwd`
122  else    if ($pwd:t == bin & -d ../model & -d ../eesupp & -d ../pkg) then
123    if (! $?EXEDIR) set EXEDIR = ( . )      set ROOTDIR = ( .. )
124      endif
125    endif
126    # Scan for logical ROOTDIR
127    if (! $?ROOTDIR) then
128      foreach dr (. .. ../.. ../../.. ../../../.. ../../../../..)
129        if (-d $dr/model & -d $dr/eesupp & -d $dr/pkg) then
130          set ROOTDIR = $dr
131          echo ROOTDIR was not specified. Setting ROOTDIR = \"$ROOTDIR\"
132          break
133        endif
134      end
135    endif
136    if (! $?ROOTDIR) then
137      echo Root directory was not specified and could not be determined.
138      echo Specify the root location of the model source with -rootdir=dir
139      exit 1
140  endif  endif
141  if (! -d $ROOTDIR) then  if (! -d $ROOTDIR) then
142    echo Root directory $ROOTDIR not found.;exit 1    echo Root directory $ROOTDIR not found.;exit 1
# Line 138  if (! $?BUILDDIR) set BUILDDIR = ( . ) Line 154  if (! $?BUILDDIR) set BUILDDIR = ( . )
154  if (! -d $BUILDDIR) then  if (! -d $BUILDDIR) then
155    echo Build directory $BUILDDIR not found.;exit 1    echo Build directory $BUILDDIR not found.;exit 1
156  endif  endif
157  if (! $?EXEDIR) set EXEDIR = ( $ROOTDIR/exe )  if (! $?EXEDIR) then
158      set pwd=`pwd`
159      if ($pwd:t == bin & -d ../exe & $ROOTDIR == ..) then
160       set EXEDIR = ( ../exe )
161      else
162       set EXEDIR = ( . )
163      endif
164    endif
165  if (! -d $EXEDIR) then  if (! -d $EXEDIR) then
166    echo Executable directory $EXEDIR not found.;exit 1    echo Executable directory $EXEDIR not found.;exit 1
167  endif  endif
# Line 231  switch ($platform$USEMPI) Line 254  switch ($platform$USEMPI)
254      set KPPFILES   = ( 'main.F' )      set KPPFILES   = ( 'main.F' )
255      set KFLAGS1    = ( '-scan=132 -noconc -cmp=' )      set KFLAGS1    = ( '-scan=132 -noconc -cmp=' )
256      set FC         = ( 'f77' )      set FC         = ( 'f77' )
257      set FFLAGS     = ( '-convert big_endian -r8 -extend_source -u -automatic -call_shared -notransform_loops -align dcommons' )      set FFLAGS     = ( '-convert big_endian -r8 -extend_source -automatic -call_shared -notransform_loops -align dcommons' )
258      set FOPTIM     = ( '-O5 -fast -tune host -inline all' )      set FOPTIM     = ( '-O5 -fast -tune host -inline all' )
259      set NOOPTFLAGS = ( '-O0' )      set NOOPTFLAGS = ( '-O0' )
260      set LIBS       = ( '-lfmpi -lmpi -lkmp_osfp10 -pthread' )      set LIBS       = ( '-lfmpi -lmpi -lkmp_osfp10 -pthread' )
# Line 608  Clean: Line 631  Clean:
631          -rm -f Makefile.bak          -rm -f Makefile.bak
632  CLEAN:  CLEAN:
633          @make Clean          @make Clean
634          -find \$(ROOTDIR) -name "*.meta" -exec rm {} \;          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;
635          -find \$(ROOTDIR) -name "*.data" -exec rm {} \;          -find \$(EXEDIR) -name "*.data" -exec rm {} \;
636          -rm -f \$(EXECUTABLE)          -rm -f \$(EXECUTABLE)
637    
638  # The normal chain of rules is (  .F - .f - .o  )  # The normal chain of rules is (  .F - .f - .o  )

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.22