--- MITgcm/tools/genmake2 2003/12/05 18:09:35 1.54 +++ MITgcm/tools/genmake2 2003/12/09 18:58:24 1.57 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.54 2003/12/05 18:09:35 edhill Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.57 2003/12/09 18:58:24 edhill Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -78,7 +78,9 @@ tmp1=`uname`"_"`uname -m` tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 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/'` + tmp1=`echo $tmp3 | sed -e 's|x86_64|amd64|'` + tmp2=`echo $tmp1 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'` + PLATFORM=$tmp2 OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")` echo " The platform appears to be: $PLATFORM" @@ -476,7 +478,7 @@ TOOLSDIR= SOURCEDIRS= INCLUDEDIRS= -STANDARDDIRS= +STANDARDDIRS="USE_THE_DEFAULT" PWD=`pwd` MAKE=make @@ -1177,9 +1179,8 @@ #EH3 WARNING : This is an UGLY HACK that needs to be removed!!! case $i in aim_v23) - DEFINES="$DEFINES -DALLOW_AIM" ENABLED_PACKAGES="$ENABLED_PACKAGES -DALLOW_AIM" - echo "Warning: ALLOW_AIM is set to enable aim_v23. This is REALLY ugly Jean-Michel :-)" + echo "Warning: ALLOW_AIM is set to enable aim_v23." ;; esac #EH3 WARNING : This is an UGLY HACK that needs to be removed!!! @@ -1188,27 +1189,29 @@ echo " Adding STANDARDDIRS" BUILDDIR=${BUILDDIR:-.} -if test "x$STANDARDDIRS" = x ; then +if test "x$STANDARDDIRS" = xUSE_THE_DEFAULT ; then STANDARDDIRS="eesupp model" fi -for d in $STANDARDDIRS ; do - adr="$ROOTDIR/$d/src" - if test ! -d $adr ; then - echo "Error: directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\"" - echo " is correct and that you correctly specified the STANDARDDIRS option" - exit 1 - else - SOURCEDIRS="$SOURCEDIRS $adr" - fi - adr="$ROOTDIR/$d/inc" - if test ! -d $adr ; then - echo "Error: directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\"" - echo " is correct and that you correctly specified the STANDARDDIRS option" - exit 1 - else - INCLUDEDIRS="$INCLUDEDIRS $adr" - fi -done +if test "x$STANDARDDIRS" != x ; then + for d in $STANDARDDIRS ; do + adr="$ROOTDIR/$d/src" + if test ! -d $adr ; then + echo "Error: directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\"" + echo " is correct and that you correctly specified the STANDARDDIRS option" + exit 1 + else + SOURCEDIRS="$SOURCEDIRS $adr" + fi + adr="$ROOTDIR/$d/inc" + if test ! -d $adr ; then + echo "Error: directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\"" + echo " is correct and that you correctly specified the STANDARDDIRS option" + exit 1 + else + INCLUDEDIRS="$INCLUDEDIRS $adr" + fi + done +fi echo " Searching for *OPTIONS.h files in order to warn about the presence" echo " of \"#define \"-type statements that are no longer allowed:"