/[MITgcm]/MITgcm_contrib/ESMF/mytools/mkmod.sh
ViewVC logotype

Diff of /MITgcm_contrib/ESMF/mytools/mkmod.sh

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

revision 1.7 by cnh, Fri Feb 20 16:59:09 2004 UTC revision 1.11 by cnh, Fri Feb 27 17:09:09 2004 UTC
# Line 1  Line 1 
1  #!<TCSH_PATH> -fxv  #!<TCSH_PATH> -f
2  #  #
3  #$Id$  #$Id$
4  #$Name$  #$Name$
# Line 126  EOF Line 126  EOF
126  # Change all the common block names in the module to use the module prefix  # Change all the common block names in the module to use the module prefix
127  cat ${mpref_l}_mod.Ftmp | sed s'z\( *COMMON[^/]*\)/\(.*\)/\([^/]*\)z      COMMON/C_'${mpref_s}'_\2/\3z' > f1.Ftmp  cat ${mpref_l}_mod.Ftmp | sed s'z\( *COMMON[^/]*\)/\(.*\)/\([^/]*\)z      COMMON/C_'${mpref_s}'_\2/\3z' > f1.Ftmp
128  cp f1.Ftmp ${mpref_l}_mod.Ftmp  cp f1.Ftmp ${mpref_l}_mod.Ftmp
129    cat ${mpref_l}_mod.Ftmp | sed s'/C_'${mpref_s}'_MPIPRIV/MPIPRIV/' > f1.Ftmp
130    cp f1.Ftmp ${mpref_l}_mod.Ftmp
131    
132    
133  echo "Compiling code"  echo "Compiling code"
134  source ${BUILDROOT}/mytools/comp_profile.${COMP_PROF}  source ${BUILDROOT}/mytools/comp_profile.${COMP_PROF}
# Line 142  foreach f ( $mitgcmrtl ) Line 145  foreach f ( $mitgcmrtl )
145   echo " " | $comp $compopts -c ${f}   echo " " | $comp $compopts -c ${f}
146   set mitgcmrtlo = ( $mitgcmrtlo ${f:r}.o )   set mitgcmrtlo = ( $mitgcmrtlo ${f:r}.o )
147  end  end
148  cc -q64 -c tim.c  ${cccommand} ${ccopts} tim.c
149  set mitgcmrtlo = ( $mitgcmrtlo tim.o )  set mitgcmrtlo = ( $mitgcmrtlo tim.o )
150  \rm mmout/libmitgcmrtl.a  \rm mmout/libmitgcmrtl.a
151  ${arcommand} ${aropts} mmout/libmitgcmrtl.a $mitgcmrtlo  ${arcommand} ${aropts} mmout/libmitgcmrtl.a $mitgcmrtlo
# Line 155  mv foo.F ${mpref_l}_mod.F Line 158  mv foo.F ${mpref_l}_mod.F
158  echo " " | $comp $compopts -c ${mpref_l}_mod.F ${complibs} ${compinc}  echo " " | $comp $compopts -c ${mpref_l}_mod.F ${complibs} ${compinc}
159  mv ${mpref_l}_mod.F ${mpref_l}_mod.Ftmp  mv ${mpref_l}_mod.F ${mpref_l}_mod.Ftmp
160  ./template_comp.sh ${mpref_s}  ./template_comp.sh ${mpref_s}
161  cc -q64 -c component_${mpref_s}_context.c  ${cccommand} ${ccopts} component_${mpref_s}_context.c
162  \rm mmout/lib${mpref_l}.a  \rm mmout/lib${mpref_l}.a
163  ${arcommand} ${aropts} mmout/lib${mpref_l}.a ${mpref_l}_mod.o component_${mpref_s}_context.o  ${arcommand} ${aropts} mmout/lib${mpref_l}.a ${mpref_l}_mod.o component_${mpref_s}_context.o
164  #ranlib mmout/lib${mpref_l}.a  #ranlib mmout/lib${mpref_l}.a
165  cp ${mpref_l}.mod mmout  set modname = `echo ${mpref_l} | ${mkmodname}`
166  \rm *mod  echo $modname
167    cp ${modname}.mod mmout
168    #\rm *mod

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22