--- MITgcm/tools/genmake2 2003/10/24 05:52:05 1.23 +++ MITgcm/tools/genmake2 2003/11/04 18:40:58 1.27 @@ -1,6 +1,6 @@ #!/bin/bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.23 2003/10/24 05:52:05 edhill Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.27 2003/11/04 18:40:58 edhill Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -72,7 +72,8 @@ tmp1=`uname`"_"`uname -m` tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - PLATFORM=`echo $tmp2 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'` + tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'` + PLATFORM=`echo $tmp3 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'` OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")` echo " The platform appears to be: $PLATFORM" # if test "x$OFLIST" = x ; then @@ -104,7 +105,7 @@ fi # look for possible fortran compilers - tmp="$MITGCM_FC $FC g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95" + tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95" p_FC= for c in $tmp ; do rm -f ./hello.f ./hello @@ -909,24 +910,6 @@ fi done -# This is compatible with the old genmake. The "DISABLE_*" flags -# need to be replaced by the "ALLOW_*" flags set below. -# -# echo -n " Setting package-specific CPP flags: " -# pkrm=( mom_fluxform mom_vecinv generic_advdiff ) -# pkrmdef=( -DDISABLE_MOM_FLUXFORM -DDISABLE_MOM_VECINV -DDISABLE_GENERIC_ADVDIFF -DDISABLE_DEBUGMODE ) -# echo -n " " -# i=0 -# while test $i -lt "${#pkrm[@]}" ; do -# echo "$PACKAGES" | grep "${pk[$i]}" > /dev/null 2>&1 -# RETVAL=$? -# if test "x$RETVAL" = x1 ; then -# DEFINES="$DEFINES ${pkdef[$i]}" -# echo -n " ${pkdef[$i]}" -# fi -# i=$(( $i + 1 )) -# done -# echo # Create a list of #define and #undef to enable/disable packages PACKAGES_DOT_H=PACKAGES_CONFIG.h @@ -970,9 +953,6 @@ mom_vecinv) DEFINES="$DEFINES -DDISABLE_MOM_VECINV" ;; - debug) - DEFINES="$DEFINES -DDISABLE_DEBUGMODE" - ;; esac #EH3 WARNING : This is an UGLY HACK that needs to be removed!!! @@ -1369,7 +1349,7 @@ adtaf: ad_taf_output.f adtamc: ad_tamc_output.f -ad_input_code.f: \$(SRCFILES) \$(HEADERFILES) +ad_input_code.f: \$(AD_FILES) \$(HEADERFILES) cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h @make \$(F77FILES) @make \$(AD_FLOW_FILES) @@ -1395,7 +1375,7 @@ ftltaf: ftl_taf_output.f ftltamc: ftl_tamc_output.f -ftl_input_code.f: \$(SRCFILES) +ftl_input_code.f: \$(AD_FILES) \$(HEADERFILES) cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h @make \$(F77FILES) @make \$(AD_FLOW_FILES)