/[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.120 by mlosch, Fri Mar 11 07:25:17 2005 UTC revision 1.121 by edhill, Tue Mar 22 19:45:03 2005 UTC
# Line 1826  for i in $SOURCEDIRS ; do Line 1826  for i in $SOURCEDIRS ; do
1826          cat $i/$j >> ad_files          cat $i/$j >> ad_files
1827      done      done
1828  done  done
1829    if test ! "x"$FS = "x.f" ; then
1830        cat ad_files | sed -e "s/\.f/$FS/g" > ad_files_f
1831        mv -f ad_files_f ad_files
1832    fi
1833    
1834  echo  echo
1835  echo "===  Creating the Makefile  ==="  echo "===  Creating the Makefile  ==="
# Line 2151  cat >>$MAKEFILE <<EOF Line 2154  cat >>$MAKEFILE <<EOF
2154    
2155  # ... AD ...  # ... AD ...
2156  adall: ad_taf  adall: ad_taf
2157  adtaf: ad_taf_output.f  adtaf: ad_taf_output.$FS
2158  adtamc: ad_tamc_output.f  adtamc: ad_tamc_output.$FS
2159    
2160  ad_input_code.f: \$(AD_FILES) \$(HEADERFILES)  ad_input_code.$FS: \$(AD_FILES) \$(HEADERFILES)
2161          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ad_config.template          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ad_config.template
2162          cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h          cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h
2163          -rm -f ad_config.template          -rm -f ad_config.template
2164          @make \$(F77FILES)          @make \$(F77FILES)
2165          @make \$(AD_FLOW_FILES)          @make \$(AD_FLOW_FILES)
2166          cat \$(AD_FLOW_FILES) \$(AD_FILES) > ad_input_code.f          cat \$(AD_FLOW_FILES) \$(AD_FILES) > ad_input_code.$FS
2167    
2168  ad_taf_output.f: ad_input_code.f  ad_taf_output.$FS: ad_input_code.$FS
2169          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.f          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS
2170          cat ad_input_code_ad.f | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.f          cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS
2171    
2172  adtafonly:  adtafonly:
2173          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.f          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS
2174          cat ad_input_code_ad.f | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.f          cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS
2175    
2176  ad_taf: ad_taf_output.o \$(OBJFILES)  ad_taf: ad_taf_output.o \$(OBJFILES)
2177          \$(LINK) -o ${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_taf_output.o \$(LIBS)          \$(LINK) -o ${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_taf_output.o \$(LIBS)
2178    
2179  ad_tamc_output.f: ad_input_code.f  ad_tamc_output.$FS: ad_input_code.$FS
2180          \$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.f          \$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.$FS
2181          cat ad_input_code_ad.f | sed -f \$(TOOLSDIR)/adjoint_sed > ad_tamc_output.f          cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_tamc_output.$FS
2182    
2183  ad_tamc: ad_tamc_output.o \$(OBJFILES)  ad_tamc: ad_tamc_output.o \$(OBJFILES)
2184          \$(LINK) -o ${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_tamc_output.o \$(LIBS)          \$(LINK) -o ${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_tamc_output.o \$(LIBS)
# Line 2188  adtrick: Line 2191  adtrick:
2191    
2192  # ... FTL ...  # ... FTL ...
2193  ftlall: ftl_taf  ftlall: ftl_taf
2194  ftltaf: ftl_taf_output.f  ftltaf: ftl_taf_output.$FS
2195  ftltamc: ftl_tamc_output.f  ftltamc: ftl_tamc_output.$FS
2196    
2197  ftl_input_code.f: \$(AD_FILES) \$(HEADERFILES)  ftl_input_code.$FS: \$(AD_FILES) \$(HEADERFILES)
2198          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ftl_config.template          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ftl_config.template
2199          cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h          cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h
2200          -rm -f ftl_config.template          -rm -f ftl_config.template
2201          @make \$(F77FILES)          @make \$(F77FILES)
2202          @make \$(AD_FLOW_FILES)          @make \$(AD_FLOW_FILES)
2203          cat \$(AD_FLOW_FILES) \$(AD_FILES) > ftl_input_code.f          cat \$(AD_FLOW_FILES) \$(AD_FILES) > ftl_input_code.$FS
2204    
2205  ftl_taf_output.f: ftl_input_code.f  ftl_taf_output.$FS: ftl_input_code.$FS
2206          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.f          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS
2207          cat ftl_input_code_ftl.f | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.f          cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS
2208    
2209  ftltafonly:  ftltafonly:
2210          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.f          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS
2211          cat ftl_input_code_ftl.f | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.f          cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS
2212    
2213  ftl_taf: ftl_taf_output.o \$(OBJFILES)  ftl_taf: ftl_taf_output.o \$(OBJFILES)
2214          \$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_taf_output.o \$(LIBS)          \$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_taf_output.o \$(LIBS)
2215    
2216  ftl_tamc_output.f: ftl_input_code.f  ftl_tamc_output.$FS: ftl_input_code.$FS
2217          \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.f          \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS
2218          cat ftl_input_code_ftl.f | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_tamc_output.f          cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_tamc_output.$FS
2219    
2220  ftl_tamc: ftl_tamc_output.o \$(OBJFILES)  ftl_tamc: ftl_tamc_output.o \$(OBJFILES)
2221          \$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_tamc_output.o \$(LIBS)          \$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_tamc_output.o \$(LIBS)
2222    
2223    
2224  # ... SVD ...  # ... SVD ...
2225  svdtaf: ad_taf_output.f ftl_taf_output.f  svdtaf: ad_taf_output.$FS ftl_taf_output.$FS
2226          @echo "--->>> Only ran TAF to generate SVD code!    <<<---"          @echo "--->>> Only ran TAF to generate SVD code!    <<<---"
2227          @echo "--->>> Do make svdall afterwards to compile. <<<---"          @echo "--->>> Do make svdall afterwards to compile. <<<---"
2228  svdall: svd_touch svd_taf  svdall: svd_touch svd_taf
# Line 2235  svd_touch: Line 2238  svd_touch:
2238          @echo "--->>> Only COMPILE svd code! <<<---"          @echo "--->>> Only COMPILE svd code! <<<---"
2239          @echo "--->>> Assumes you previously <<<---"          @echo "--->>> Assumes you previously <<<---"
2240          @echo "--->>> did make svdtaf        <<<---"          @echo "--->>> did make svdtaf        <<<---"
2241          touch ad_taf_output.f ftl_taf_output.f          touch ad_taf_output.$FS ftl_taf_output.$FS
2242          \$(FC) \$(FFLAGS) \$(FOPTIM) -c ad_taf_output.f          \$(FC) \$(FFLAGS) \$(FOPTIM) -c ad_taf_output.$FS
2243          \$(FC) \$(FFLAGS) \$(FOPTIM) -c ftl_taf_output.f          \$(FC) \$(FFLAGS) \$(FOPTIM) -c ftl_taf_output.$FS
2244          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ftl_config.template          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ftl_config.template
2245          cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h          cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h
2246          -rm -f ftl_config.template          -rm -f ftl_config.template

Legend:
Removed from v.1.120  
changed lines
  Added in v.1.121

  ViewVC Help
Powered by ViewVC 1.1.22