635 |
|
|
636 |
For more detailed genmake documentation, please see: |
For more detailed genmake documentation, please see: |
637 |
|
|
638 |
http://mitgcm.org/devel_HOWTO/ |
http://mitgcm.org/public/devel_HOWTO/ |
639 |
|
|
640 |
EOF |
EOF |
641 |
|
|
1405 |
# Find the MITgcm ${THISVER} |
# Find the MITgcm ${THISVER} |
1406 |
version_file="${ROOTDIR}/doc/tag-index" |
version_file="${ROOTDIR}/doc/tag-index" |
1407 |
if test -f $version_file ; then |
if test -f $version_file ; then |
1408 |
THISVER=`grep '^checkpoint' $version_file | head -1` |
THISVER=`$AWK '/^checkpoint/{print $1; exit}' $version_file` |
1409 |
#- remove ./BUILD_INFO.h file if older than version_file |
#- remove ./BUILD_INFO.h file if older than version_file |
1410 |
if test -f ./BUILD_INFO.h -a ./BUILD_INFO.h -ot $version_file ; then |
if test -f ./BUILD_INFO.h -a ./BUILD_INFO.h -ot $version_file ; then |
1411 |
echo " remove ./BUILD_INFO.h (older than ${version_file})" |
echo " remove ./BUILD_INFO.h (older than ${version_file})" |
2783 |
-rm -f ad_config.template |
-rm -f ad_config.template |
2784 |
@make \$(F77_PP_SRC_FILES) |
@make \$(F77_PP_SRC_FILES) |
2785 |
@make \$(FLOFILES) |
@make \$(FLOFILES) |
2786 |
cat \$(FLOFILES) \$(AD_FILES) > ad_input_code.$FS |
cat \$(FLOFILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ad_input_code.$FS |
2787 |
|
|
2788 |
ad_taf_output.$FS: ad_input_code.$FS |
ad_taf_output.$FS: ad_input_code.$FS |
2789 |
\$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS |
\$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS |
3041 |
|
|
3042 |
# canonicalizer |
# canonicalizer |
3043 |
ad_input_code_sf.w2f.pre.f$FS90: ad_input_code_sf.w2f.f$FS90 preProcess.py |
ad_input_code_sf.w2f.pre.f$FS90: ad_input_code_sf.w2f.f$FS90 preProcess.py |
3044 |
./preProcess.py -H -S \$< -o \$@ |
./preProcess.py --timing --r8 -H -S \$< -o \$@ |
3045 |
|
|
3046 |
# F -> WHIRL |
# F -> WHIRL |
3047 |
# note that the canonicalized version cuts off at col 72 |
# note that the canonicalized version cuts off at col 72 |
3063 |
|
|
3064 |
# XAIF' -> WHIRL' |
# XAIF' -> WHIRL' |
3065 |
ad_input_code_sf.w2f.pre.xb.x2w.B : ad_input_code_sf.w2f.pre.xb.xaif xaif2whirl |
ad_input_code_sf.w2f.pre.xb.x2w.B : ad_input_code_sf.w2f.pre.xb.xaif xaif2whirl |
3066 |
./xaif2whirl --debug 1 --structured ad_input_code_sf.w2f.pre.B \$< |
./xaif2whirl --debug 1 ad_input_code_sf.w2f.pre.B \$< |
3067 |
|
|
3068 |
# WHIRL' -> F' |
# WHIRL' -> F' |
3069 |
ad_input_code_sf.w2f.pre.xb.x2w.w2f.f$FS90: ad_input_code_sf.w2f.pre.xb.x2w.B whirl2f whirl2f_be |
ad_input_code_sf.w2f.pre.xb.x2w.w2f.f$FS90: ad_input_code_sf.w2f.pre.xb.x2w.B whirl2f whirl2f_be |
3081 |
# this step also creates the file postProcess.make but we cannot |
# this step also creates the file postProcess.make but we cannot |
3082 |
# name it as the target or else make will try to remake it for |
# name it as the target or else make will try to remake it for |
3083 |
# the include directive above for any rule, e.g. make clean |
# the include directive above for any rule, e.g. make clean |
3084 |
./postProcess.py -m r -i ../OAD_support/ad_inline.f --width 4 \$< |
./postProcess.py --progress --timing --outputFormat=fixed -m r -i ../OAD_support/ad_inline.f --width 4 \$< |
3085 |
|
|
3086 |
# setup some links |
# setup some links |
3087 |
%.xsd: |
%.xsd: |
3106 |
oadDriver: |
oadDriver: |
3107 |
\$(LN) \${XAIFBOOSTERROOT}/xaifBooster/algorithms/BasicBlockPreaccumulationReverse/driver/oadDriver \$@ |
\$(LN) \${XAIFBOOSTERROOT}/xaifBooster/algorithms/BasicBlockPreaccumulationReverse/driver/oadDriver \$@ |
3108 |
|
|
3109 |
AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.make postProcess.tag postProcess.comp |
AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.make postProcess.tag postProcess.comp \$(PPEXTRAS:.F=.f) |
3110 |
|
|
3111 |
# ============ end OpenAD specific section ============== |
# ============ end OpenAD specific section ============== |
3112 |
|
|