summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-03-28 01:41:24 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-03-28 01:41:24 +0000
commitb93959e2489504597e2f9e498ed935279b11d466 (patch)
treeb01a4eb2ea3045f4d36266e44f0446dea19b0a31 /lib
parentf930086bfd5df10bf0e48203e086e4a394310d07 (diff)
Updated file. Doesn't succeed in linking though 8-(
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3612 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/make/known-architectures/darwin122
1 files changed, 62 insertions, 60 deletions
diff --git a/lib/make/known-architectures/darwin b/lib/make/known-architectures/darwin
index d1e0b30a..6a96b583 100644
--- a/lib/make/known-architectures/darwin
+++ b/lib/make/known-architectures/darwin
@@ -1,66 +1,63 @@
#! /bin/sh
# /*@@
-# @file darwin6.8
-# @date Mon 6 Oct 2003
-# @author John Shalf
+# @file darwin
+# @date Sat 27 March 2004
+# @author John Shalf, Gabrielle Allen, Tom Goodale
# @desc
-# Known architecture stuff for MacOS X (Darwin) release 6.8
+# Known architecture stuff for MacOS X (Darwin)
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/darwin,v 1.8 2004-03-23 18:49:08 allen Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/darwin,v 1.9 2004-03-28 01:41:24 goodale Exp $
# @@*/
if test "$CCTK_CONFIG_STAGE" = 'preferred-compilers' ; then
- :
-
-elif test -n "$IBMXL" && test "$IBMXL" = 'yes' ; then
- echo "Configuring environment for IBM XL compilers"
- CC=xlc
- CXX=xlC
- F90=xlf
- F90=xlf
- LD=xlC
- : ${ARFLAGS='-rucs'}
- : ${F90FLAGS='-qspill=10000 -qmaxmem=-1 -qnullterm'}
- : ${F77FLAGS='-qfixed -qmaxmem=-1 -qnullterm'}
- : ${F90_OPTIMISE_FLAGS='-O5'}
- : ${F77_OPTIMISE_FLAGS='-O5'}
- : ${F90_DEBUG_FLAGS='-g'}
- : ${F77_DEBUG_FLAGS='-g'}
- : ${CFLAGS='-qspill=17000 -qmaxmem=-1'}
- : ${CXXFLAGS='-qspill=10000 -qmaxmem=-1'}
- : ${C_OPTIMISE_FLAGS='-O5'}
- : ${CXX_OPTIMISE_FLAGS='-O5'}
- : ${F90_SUFFIX='f'}
- if test -e '/usr/lib/gcc/darwin/3.3' ; then
- C_DEPEND='gcc -M -no-cpp-precomp $(CPPFLAGS)'
- CXX_DEPEND='g++ -E -M $(CPPFLAGS)'
- F_DEPEND='$(CPP) -M $(CPPFLAGS)'
- F77_DEPEND='$(CPP) -M $(CPPFLAGS)'
- else
- C_DEPEND='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl -M $(CPPFLAGS)'
- CXX_DEPEND='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl -M $(CPPFLAGS)'
- F_DEPEND='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl -M $(CPPFLAGS)'
+ # Try to work out which FPP we need to use
+ if test -z "$FPP" -a -z "$FPPFLAGS"; then
+ FPP='/usr/bin/cpp'
+
+ FPP_VERSION="`$FPP --version | awk '{print $3; exit}'`"
+ FPP_VERSION_MAJOR="`echo $FPP_VERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\1:'`"
+ FPP_VERSION_MINOR="`echo $FPP_VERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\2:'`"
+
+ if test $FPP_VERSION_MAJOR -lt 3 ; then
+ FPP="$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl"
+ FPPFLAGS=
+ FPP_VERSION="`$FPP --version | awk '{print $3; exit}'`"
+ FPP_VERSION_MAJOR="`echo $FPP_VERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\1:'`"
+ FPP_VERSION_MINOR="`echo $FPP_VERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\2:'`"
+ else
+ FPPFLAGS='-traditional'
+ fi
+
+ echo Setting FPP to $FPP
+ echo Setting FPPFLAGS to $FPPFLAGS
fi
- : ${LD='xlC'}
- : ${LIBS='xlf90 xlfmath m'}
- : ${LIBDIRS='/opt/ibmcmp/lib'}
else
+ # Find out which CPP we are using and its version
+
+ if test "`$CPP --version | grep -i gcc`"; then
+ CPP_VENDOR=GNU
+ CPP_VERSION="`cpp --version | awk '{print $3; exit}'`"
+ CPP_VERSION_MAJOR="`echo $CPP_VERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\1:'`"
+ CPP_VERSION_MINOR="`echo $CPP_VERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\2:'`"
+ elif test "`$CPP --version | grep -i Cactus`"; then
+ CPP_VENDOR=Cactus
+ CPP_VERSION="`cpp --version | awk '{print $3; exit}'`"
+ CPP_VERSION_MAJOR="`echo $CPP_VERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\1:'`"
+ CPP_VERSION_MINOR="`echo $CPP_VERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\2:'`"
+ fi
+
# this fixes some darwin-specific preprocessor bugs (?)
CFLAGS='-no-cpp-precomp'
# C_DEPEND='$(CC) -M $(CFLAGS) $(CPPFLAGS)'
if test -e '/usr/lib/gcc/darwin/3.3' ; then
C_DEPEND='gcc -M -no-cpp-precomp $(CPPFLAGS)'
CXX_DEPEND='g++ -E -M $(CPPFLAGS)'
- F_DEPEND='$(CPP) -M $(CPPFLAGS)'
- F77_DEPEND='$(CPP) -M $(CPPFLAGS)'
else
C_DEPEND='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl -M $(CPPFLAGS)'
CXX_DEPEND='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl -M $(CPPFLAGS)'
- F_DEPEND='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl -M $(CPPFLAGS)'
- FPP='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl -M $(CPPFLAGS)'
fi
# Determine which Fortran 90 compiler is in use
MAC_F90_COMP=none
@@ -69,15 +66,21 @@ else
# this should really check the path of the IBM compiler
# to make sure it is the default
# should use a regexp to match the compiler path
- if test `which f90` = '/opt/ibmcmp/xlf/8.1/bin/f90' ; then
- MAC_F90_COMP=ibm
- F90=xlf
- F77=xlf
+ if test "`$F90 -version 2>&1 | grep xlf`" ; then
+ MAC_F90_COMP=ibm
+ elif test "`$F90 -? 2>&1 | grep -i absoft`" ; then
+ MAC_F90_COMP=absoft
else
- MAC_F90_COMP=absoft
+ echo Unknown MacOS X f90 compiler.
+ echo Please add appropriate information to
+ echo $srcdir/known-architectures/darwin
+ echo and send the updated file to CactusMaint
+ echo We will try anyway ...
fi
elif test -n "$F77" ; then
- if test "`$F77 -? 2>&1 | grep -i absoft`" ; then
+ if test "`$F77 -version 2>&1 | grep xlf`" ; then
+ MAC_F77_COMP=ibm77
+ elif test "`$F77 -? 2>&1 | grep -i absoft`" ; then
MAC_F77_COMP=absoft77
else
echo Unknown MacOS X f77 compiler.
@@ -116,25 +119,24 @@ else
: ${F90_WARN_FLAGS='-m0'}
;;
ibm)
- : ${LD='xlC'}
+# : ${LD='xlC'}
: ${LIBS='xlf90 xlfmath m'}
: ${LIBDIRS='/opt/ibmcmp/lib'}
- : ${ARFLAGS='-rucs'}
- : ${F90FLAGS=' -k -qspill=10000 -qmaxmem=-1 -qnullterm'}
- : ${F77FLAGS='-qfixed -qmaxmem=-1 -qnullterm'}
+# : ${ARFLAGS='-rucs'}
+ : ${F90FLAGS=' -qspill=10000 -qmaxmem=-1 -qnullterm -qsuffix=f=f'}
+ : ${F77FLAGS='-qfixed -qmaxmem=-1 -qnullterm -qsuffix=f=f'}
: ${F90_OPTIMISE_FLAGS='-O5'}
: ${F77_OPTIMISE_FLAGS='-O5'}
: ${F90_SUFFIX='f'}
- ;;
- none)
- : ${LIBS='m'}
+
+ CCTK_WriteLine make.arch.defn 'F90FLAGS += $(DARWIN_$(subst .,,$(suffix $<))_FLAGS)'
+ CCTK_WriteLine make.arch.defn 'DARWIN_F90_FLAGS ='
+ CCTK_WriteLine make.arch.defn 'DARWIN_f90_FLAGS ='
+ CCTK_WriteLine make.arch.defn 'DARWIN_F_FLAGS = -qfixed'
+ CCTK_WriteLine make.arch.defn 'DARWIN_f_FLAGS = -qfixed'
;;
*)
- echo Unknown Darwin f90 compiler.
- echo Please add appropriate information to
- echo $srcdir/known-architectures/darwin
- echo and send the updated file to CactusMaint
- echo We will try anyway ...
+ : ${LIBS='m'}
;;
esac