/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/code_shallow_openad3/genmake2
ViewVC logotype

Diff of /MITgcm_contrib/heimbach/OpenAD/code_shallow_openad3/genmake2

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

revision 1.4 by utke, Tue Jan 9 22:12:19 2007 UTC revision 1.8 by utke, Wed Aug 8 19:15:30 2007 UTC
# Line 2271  optim \ Line 2271  optim \
2271  grdchk  grdchk
2272    
2273  .PHONY: adAll  .PHONY: adAll
2274  adAll: \$(EXE_AD)  adAll: \$(EXE_AD) ncheckLev.conf
2275    
 # these are all fixed format:  
 CB2M_F77_TO_FF90_SRC_FILES=\$(F77_SRC_FILES:.F=_cb2m.FF90)  
 CB2M_F90_SRC_FILES=\$(addsuffix _mod.FF90, \$(CB2M_F90_SRC_NAMES))  
2276  CB2M_F90_PP_SRC_FILES=\$(addsuffix _mod.f$FS90, \$(CB2M_F90_SRC_NAMES))  CB2M_F90_PP_SRC_FILES=\$(addsuffix _mod.f$FS90, \$(CB2M_F90_SRC_NAMES))
2277    
2278  .PRECIOUS: \$(CB2M_F90_PP_SRC_FILES) \$(NON_AD_F77_SRC_FILES:.F=_cb2m.ff90)  .PRECIOUS: \$(CB2M_F90_PP_SRC_FILES) \$(NON_AD_F77_SRC_FILES:.F=_cb2m.ff90)
2279    
2280  .PHONY: adDepend  .PHONY: adDepend
2281  #this file is included at the bottom  adDepend: \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) \$(addsuffix _mod.FF90, \$(CB2M_F90_SRC_NAMES)) \$(F77_SRC_FILES:.F=_cb2m.FF90)
 adDepend: \$(ALL_LINKED_FILES) \$(CB2M_F90_SRC_FILES) \$(CB2M_F77_TO_FF90_SRC_FILES)  
2282          \$(MAKEDEPEND) -o .$FS \$(DEFINES) \$(INCLUDES) \$(F77_SRC_FILES)          \$(MAKEDEPEND) -o .$FS \$(DEFINES) \$(INCLUDES) \$(F77_SRC_FILES)
2283          \$(TOOLSDIR)/f90mkdepend >> \$(MAKEFILE)          \$(TOOLSDIR)/f90mkdepend >> \$(MAKEFILE)
2284          -rm -f makedepend.out          -rm -f makedepend.out
2285    
   
2286  OPENAD_SUPPORT_F90_SRC_FILES = \  OPENAD_SUPPORT_F90_SRC_FILES = \
2287  w2f__types.f90 \  w2f__types.f90 \
2288  active_module.f90 \  active_module.f90 \
# Line 2310  f95_test.out: f95_test_mods.f90 f95_test Line 2305  f95_test.out: f95_test_mods.f90 f95_test
2305          f95 -w=unused -maxcontin=132 -c f95_test_mods.f90 > \$@ 2>&1          f95 -w=unused -maxcontin=132 -c f95_test_mods.f90 > \$@ 2>&1
2306          f95 -w=unused -maxcontin=132 -c -fixed f95_test.f90 >> \$@ 2>&1          f95 -w=unused -maxcontin=132 -c -fixed f95_test.f90 >> \$@ 2>&1
2307    
2308  AD_OBJ_FILES=\$(OPENAD_SUPPORT_F90_SRC_FILES:.f90=.o) \$(OPENAD_SUPPORT_C_SRC_FILES:.c=.o) all_mods.xb.x2w.w2f.pp.o ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.o \$(NON_AD_F77_SRC_FILES:.F=_cb2m.o) \$(C_SRC_FILES:.c=.o) \$(F90_SRC_FILES:.F90=.o)  AD_OBJ_FILES=\$(OPENAD_SUPPORT_F90_SRC_FILES:.f90=.o) \$(OPENAD_SUPPORT_C_SRC_FILES:.c=.o) all_mods.xb.x2w.w2f.pp.o  ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.o \$(NON_AD_F77_SRC_FILES:.F=_cb2m.o) \$(C_SRC_FILES:.c=.o) \$(F90_SRC_FILES:.F90=.o)
2309    
2310  \$(EXE_AD): \$(AD_OBJ_FILES)  \$(EXE_AD): \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) \$(AD_OBJ_FILES)
2311          @echo Creating \$@ ...          @echo Creating \$@ ...
2312          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$^ \$(LIBS)          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(AD_OBJ_FILES) \$(LIBS)
2313    
2314  # makefile debug rule  # makefile debug rule
2315  openad: ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.f  openad: ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.f
2316  .PHONY: openad  .PHONY: openad
2317    
2318  CB2MFILES= cb2m1.csh cb2m1.awk cb2m2.bash  # create the module files
2319  # create the module files and change the header files  %_mod.FF90 : %.h ${MODS}/cb2mGetModules.csh ${MODS}/cb2mGetModules.awk
2320  \$(CB2M_F90_SRC_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) : \$(ALL_LINKED_FILES) \$(CB2MFILES)          ${MODS}/cb2mGetModules.csh $< ${MODS}/cb2mGetModules.awk
2321          ./cb2m1.csh \$(CB2M_F90_SRC_NAMES)  
2322    # create the header files
2323  # change everybody else to use the module files:  %_mod.h : %.h ${MODS}/cb2mGetHeaders.csh ${MODS}/cb2mGetHeaders.awk
2324  \$(CB2M_F77_TO_FF90_SRC_FILES): \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) \$(CB2M_F90_SRC_FILES)          ${MODS}/cb2mGetHeaders.csh $< ${MODS}/cb2mGetHeaders.awk
2325          ./cb2m2.bash  
2326    # change everybody else to use the new module files:
2327    %_cb2m.FF90 : %.F ${MODS}/cb2mUseModules.bash
2328            ${MODS}/cb2mUseModules.bash $<
2329    
2330  # makefile debug rule  # makefile debug rule
2331  small_f: \$(CB2M_F77_PP_SRC_FILES) \$(CB2M_F90_PP_SRC_FILES)  small_f: \$(CB2M_F90_PP_SRC_FILES)
2332  .PHONY: small_f  .PHONY: small_f
2333    
2334  ad_output.txt: \$(EXE_AD)  ad_output.txt: \$(EXE_AD)
# Line 2344  CB2M_AD_FILES=\$(AD_FILES:.f=_cb2m.ff90) Line 2342  CB2M_AD_FILES=\$(AD_FILES:.f=_cb2m.ff90)
2342  ad_input_code.$FS: ${MODS}/maxMinDefs.f \$(CB2M_AD_FILES)  ad_input_code.$FS: ${MODS}/maxMinDefs.f \$(CB2M_AD_FILES)
2343          cat \$^ > \$@          cat \$^ > \$@
2344    
 \$(CB2MFILES):  
         \$(LN) \$(addprefix ${MODS}/, \$(CB2MFILES)) .  
   
2345  # strip all comments and blanks to reduce  # strip all comments and blanks to reduce
2346  # the file size in order to reduce perl's memory requirements  # the file size in order to reduce perl's memory requirements
2347  ad_input_code_sf.f : ad_input_code.f  ad_input_code_sf.f : ad_input_code.f
# Line 2357  ad_input_code_sf.f : ad_input_code.f Line 2352  ad_input_code_sf.f : ad_input_code.f
2352  # expose mfef90 specific substring handling  # expose mfef90 specific substring handling
2353  # add the w2f__types module  # add the w2f__types module
2354  ad_input_code_sf.w2f.f: ad_input_code_sf.f mfef90 whirl2f whirl2f_be w2f__types.f90  ad_input_code_sf.w2f.f: ad_input_code_sf.f mfef90 whirl2f whirl2f_be w2f__types.f90
2355          ./mfef90 -F -N132 \$<          ./mfef90 -z -F -N132 \$<
2356          ./whirl2f \$<          ./whirl2f \$<
2357          cat w2f__types.f90 \$@ > \$@.1          cat w2f__types.f90 \$@ > \$@.1
2358          mv \$@.1 \$@            mv \$@.1 \$@  
# Line 2373  ad_input_code_sf.w2f.canon.f: ad_input_c Line 2368  ad_input_code_sf.w2f.canon.f: ad_input_c
2368  # Otherwise mfef90 patches in spaces to fill up to 72 (or 132)  # Otherwise mfef90 patches in spaces to fill up to 72 (or 132)
2369  # characters respectively.  # characters respectively.
2370  ad_input_code_sf.w2f.canon.B: ad_input_code_sf.w2f.canon.f mfef90  ad_input_code_sf.w2f.canon.B: ad_input_code_sf.w2f.canon.f mfef90
2371          ./mfef90 -F \$<          ./mfef90 -z -F \$<
2372    
2373  # WHIRL -> XAIF  # WHIRL -> XAIF
2374  ad_input_code_sf.w2f.canon.xaif : ad_input_code_sf.w2f.canon.B whirl2xaif  ad_input_code_sf.w2f.canon.xaif : ad_input_code_sf.w2f.canon.B whirl2xaif
# Line 2381  ad_input_code_sf.w2f.canon.xaif : ad_inp Line 2376  ad_input_code_sf.w2f.canon.xaif : ad_inp
2376    
2377  # XAIF -> XAIF'  # XAIF -> XAIF'
2378  ad_input_code_sf.w2f.canon.xb.xaif : ad_input_code_sf.w2f.canon.xaif xaif.xsd xaif_base.xsd xaif_inlinable_intrinsics.xsd xaif_derivative_propagator.xsd xaif_output.xsd openad_adm  ad_input_code_sf.w2f.canon.xb.xaif : ad_input_code_sf.w2f.canon.xaif xaif.xsd xaif_base.xsd xaif_inlinable_intrinsics.xsd xaif_derivative_propagator.xsd xaif_output.xsd openad_adm
2379          ./openad_adm -t forward_step -i \$< -c \${XAIFSCHEMAROOT}/schema/examples/inlinable_intrinsics.xaif -o \$@ -I -r -p "recip_hFacC recip_rA GM_Kmin_horiz"          ./openad_adm -f -t forward_step -i \$< -c \${XAIFSCHEMAROOT}/schema/examples/inlinable_intrinsics.xaif -o \$@ -I -r -p "recip_hFacC recip_rA GM_Kmin_horiz"
2380    
2381  # XAIF' -> WHIRL'  # XAIF' -> WHIRL'
2382  ad_input_code_sf.w2f.canon.xb.x2w.B : ad_input_code_sf.w2f.canon.xb.xaif xaif2whirl  ad_input_code_sf.w2f.canon.xb.x2w.B : ad_input_code_sf.w2f.canon.xb.xaif xaif2whirl
# Line 2424  mfef90: Line 2419  mfef90:
2419          \$(LN) \${OPENADROOT}/Open64/osprey1.0/targ_ia32_ia64_linux/crayf90/sgi/mfef90 .          \$(LN) \${OPENADROOT}/Open64/osprey1.0/targ_ia32_ia64_linux/crayf90/sgi/mfef90 .
2420    
2421  # link the support files:  # link the support files:
2422  \$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES) :  \$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES) ncheckLev.conf :
2423          \$(LN) ${MODS}/\$@ .          \$(LN) ${MODS}/\$@ .
2424    
2425  whirl2xaif xaif2whirl:  whirl2xaif xaif2whirl:

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22