/[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.28 by adcroft, Wed Feb 7 16:49:20 2001 UTC
# Line 50  while ($#allargs) Line 50  while ($#allargs)
50      echo "***" Command line \"$arg\" will override this.      echo "***" Command line \"$arg\" will override this.
51     endif     endif
52     set ROOTDIR = ( `echo $arg | sed 's/-rootdir=//' `)     set ROOTDIR = ( `echo $arg | sed 's/-rootdir=//' `)
53       if (! $?EXEDIR) set EXEDIR = ( . )
54     breaksw     breaksw
55   case -mods:   case -mods:
56   case -mods=:   case -mods=:
# Line 58  while ($#allargs) Line 59  while ($#allargs)
59     exit     exit
60     breaksw     breaksw
61   case -mods=*:   case -mods=*:
62     set MODS = ( $MODS `echo $arg | sed 's/-mods=//' | sed 's/,/ /' `)     set MODS = ( $MODS `echo $arg | sed 's/-mods=//' | sed 's/,/ /g' `)
63     breaksw     breaksw
64   case -disable:   case -disable:
65   case -disable=:   case -disable=:
# Line 67  while ($#allargs) Line 68  while ($#allargs)
68     exit     exit
69     breaksw     breaksw
70   case -disable=*:   case -disable=*:
71     set DISABLE = ( $DISABLE `echo $arg | sed 's/-disable=//' | sed 's/,/ /' `)     set DISABLE = ( $DISABLE `echo $arg | sed 's/-disable=//' | sed 's/,/ /g' `)
72     breaksw     breaksw
73   case -enable:   case -enable:
74   case -enable=:   case -enable=:
# Line 77  while ($#allargs) Line 78  while ($#allargs)
78     exit     exit
79     breaksw     breaksw
80   case -enable=*:   case -enable=*:
81     set ENABLE = ( $ENABLE `echo $arg | sed 's/-enable=//' | sed 's/,/ /' `)     set ENABLE = ( $ENABLE `echo $arg | sed 's/-enable=//' | sed 's/,/ /g' `)
82     breaksw     breaksw
83   case -mpi:   case -mpi:
84     echo "Enabling MPI options"     echo "Enabling MPI options"
# Line 118  echo Operating system: $mach Line 119  echo Operating system: $mach
119  # 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
120  # 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
121  if (! $?ROOTDIR) then  if (! $?ROOTDIR) then
122    set ROOTDIR = ( .. )    set pwd=`pwd`
123  else    if ($pwd:t == bin) then
124    if (! $?EXEDIR) set EXEDIR = ( . )      if (-d ../exe & -d ../model & -d ../eesupp & -d ../pkg) then
125          set ROOTDIR = ( .. )
126          if (! $?EXEDIR) set EXEDIR = ( ../exe )
127        else if (-d ../model & -d ../eesupp & -d ../pkg) then
128          echo In bin with no exe
129          if (! $?EXEDIR) set EXEDIR = ( . )
130        endif
131      endif
132    endif
133    # Scan for logical ROOTDIR
134    if (! $?ROOTDIR) then
135      foreach dr (. .. ../.. ../../.. ../../../.. ../../../../..)
136        if (-d $dr/model & -d $dr/eesupp & -d $dr/pkg) then
137          set ROOTDIR = $dr
138          if (! $?EXEDIR) set EXEDIR = ( . )
139          echo ROOTDIR was not specified. Setting ROOTDIR = \"$ROOTDIR\"
140          break
141        endif
142      end
143    endif
144    if (! $?ROOTDIR) then
145      echo Root directory was not specified and could not be determined.
146      echo Specify the root location of the model source with -rootdir=dir
147      exit 1
148  endif  endif
149  if (! -d $ROOTDIR) then  if (! -d $ROOTDIR) then
150    echo Root directory $ROOTDIR not found.;exit 1    echo Root directory $ROOTDIR not found.;exit 1
# Line 138  if (! $?BUILDDIR) set BUILDDIR = ( . ) Line 162  if (! $?BUILDDIR) set BUILDDIR = ( . )
162  if (! -d $BUILDDIR) then  if (! -d $BUILDDIR) then
163    echo Build directory $BUILDDIR not found.;exit 1    echo Build directory $BUILDDIR not found.;exit 1
164  endif  endif
 if (! $?EXEDIR) set EXEDIR = ( $ROOTDIR/exe )  
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.28

  ViewVC Help
Powered by ViewVC 1.1.22