Created
November 15, 2014 18:52
-
-
Save saifthe1/e1ac2db5b7d5d356da33 to your computer and use it in GitHub Desktop.
This patch is vital for building OpenFOAM on Mac, it contains significant patch for various files to adapt to Mac OS environment and error fixes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# Parent 24bbab269ff59737611bb1ffb71a2ae62e99a3e6 | |
diff --git a/applications/solvers/combustion/chemFoam/Make/options b/applications/solvers/combustion/chemFoam/Make/options | |
--- a/applications/solvers/combustion/chemFoam/Make/options | |
+++ b/applications/solvers/combustion/chemFoam/Make/options | |
@@ -12,6 +12,7 @@ | |
EXE_LIBS = \ | |
-lfiniteVolume \ | |
+ -lcompressibleTurbulenceModel \ | |
-lcompressibleRASModels \ | |
-lreactionThermophysicalModels \ | |
-lbasicThermophysicalModels \ | |
diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options | |
--- a/applications/solvers/combustion/fireFoam/Make/options | |
+++ b/applications/solvers/combustion/fireFoam/Make/options | |
@@ -30,6 +30,7 @@ | |
EXE_LIBS = \ | |
-lfiniteVolume \ | |
-lmeshTools \ | |
+ -lcompressibleTurbulenceModel \ | |
-lcompressibleRASModels \ | |
-lcompressibleLESModels \ | |
-lspecie \ | |
@@ -46,5 +47,6 @@ | |
-lradiationModels \ | |
-lsurfaceFilmModels \ | |
-lpyrolysisModels \ | |
+ -llagrangian \ | |
-llagrangianIntermediate \ | |
-lODE | |
diff --git a/applications/solvers/compressible/rhoSimplecFoam/Make/options b/applications/solvers/compressible/rhoSimplecFoam/Make/options | |
--- a/applications/solvers/compressible/rhoSimplecFoam/Make/options | |
+++ b/applications/solvers/compressible/rhoSimplecFoam/Make/options | |
@@ -9,6 +9,7 @@ | |
EXE_LIBS = \ | |
-lbasicThermophysicalModels \ | |
-lspecie \ | |
+ -lcompressibleTurbulenceModel \ | |
-lcompressibleRASModels \ | |
-lfiniteVolume \ | |
-lmeshTools | |
diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options | |
--- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options | |
+++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options | |
@@ -6,6 +6,7 @@ | |
-I$(LIB_SRC)/finiteVolume/lnInclude | |
EXE_LIBS = \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleTransportModels \ | |
-lfiniteVolume | |
diff --git a/applications/solvers/incompressible/channelFoam/Make/options b/applications/solvers/incompressible/channelFoam/Make/options | |
--- a/applications/solvers/incompressible/channelFoam/Make/options | |
+++ b/applications/solvers/incompressible/channelFoam/Make/options | |
@@ -8,6 +8,7 @@ | |
-I$(LIB_SRC)/sampling/lnInclude | |
EXE_LIBS = \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleLESModels \ | |
-lincompressibleTransportModels \ | |
-lfiniteVolume \ | |
diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options | |
--- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options | |
+++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options | |
@@ -14,6 +14,7 @@ | |
-ldynamicMesh \ | |
-lmeshTools \ | |
-lincompressibleTransportModels \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleLESModels \ | |
-lfiniteVolume | |
diff --git a/applications/solvers/incompressible/simpleFoam/MRFSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/MRFSimpleFoam/Make/options | |
--- a/applications/solvers/incompressible/simpleFoam/MRFSimpleFoam/Make/options | |
+++ b/applications/solvers/incompressible/simpleFoam/MRFSimpleFoam/Make/options | |
@@ -8,6 +8,7 @@ | |
-I$(LIB_SRC)/meshTools/lnInclude | |
EXE_LIBS = \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleTransportModels \ | |
-lfiniteVolume \ | |
diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options | |
--- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options | |
+++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options | |
@@ -8,6 +8,7 @@ | |
-I$(LIB_SRC)/meshTools/lnInclude | |
EXE_LIBS = \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleTransportModels \ | |
-lfiniteVolume \ | |
diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options | |
--- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options | |
+++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options | |
@@ -24,6 +24,7 @@ | |
-lbasicThermophysicalModels \ | |
-lspecie \ | |
-lradiationModels \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleLESModels \ | |
-lincompressibleTransportModels \ | |
diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options | |
--- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options | |
+++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options | |
@@ -20,6 +20,7 @@ | |
-lbasicThermophysicalModels \ | |
-lspecie \ | |
-lradiationModels \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleLESModels \ | |
-lincompressibleTransportModels \ | |
diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options | |
--- a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options | |
+++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options | |
@@ -26,6 +26,7 @@ | |
EXE_LIBS = \ | |
-lfiniteVolume \ | |
-lmeshTools \ | |
+ -lcompressibleTurbulenceModel \ | |
-lcompressibleRASModels \ | |
-lcompressibleLESModels \ | |
-lspecie \ | |
@@ -39,6 +40,7 @@ | |
-lregionModels \ | |
-lradiationModels \ | |
-lsurfaceFilmModels \ | |
+ -llagrangian \ | |
-llagrangianIntermediate \ | |
-lODE \ | |
-lcombustionModels | |
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options | |
--- a/applications/solvers/multiphase/compressibleInterFoam/Make/options | |
+++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options | |
@@ -6,6 +6,7 @@ | |
-I$(LIB_SRC)/finiteVolume/lnInclude | |
EXE_LIBS = \ | |
+ -linterfaceProperties \ | |
-ltwoPhaseInterfaceProperties \ | |
-lincompressibleTransportModels \ | |
-lincompressibleTurbulenceModel \ | |
diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options | |
--- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options | |
+++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options | |
@@ -10,6 +10,7 @@ | |
-I$(LIB_SRC)/dynamicFvMesh/lnInclude | |
EXE_LIBS = \ | |
+ -linterfaceProperties \ | |
-ltwoPhaseInterfaceProperties \ | |
-lincompressibleTransportModels \ | |
-lincompressibleTurbulenceModel \ | |
diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options | |
--- a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options | |
+++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options | |
@@ -7,6 +7,7 @@ | |
-I$(LIB_SRC)/finiteVolume/lnInclude | |
EXE_LIBS = \ | |
+ -linterfaceProperties \ | |
-ltwoPhaseInterfaceProperties \ | |
-lincompressibleTransportModels \ | |
-lincompressibleTurbulenceModel \ | |
diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options | |
--- a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options | |
+++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options | |
@@ -7,6 +7,7 @@ | |
-I$(LIB_SRC)/finiteVolume/lnInclude | |
EXE_LIBS = \ | |
+ -linterfaceProperties \ | |
-ltwoPhaseInterfaceProperties \ | |
-lincompressibleTransportModels \ | |
-lincompressibleTurbulenceModel \ | |
diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options | |
--- a/applications/solvers/multiphase/interFoam/Make/options | |
+++ b/applications/solvers/multiphase/interFoam/Make/options | |
@@ -7,6 +7,7 @@ | |
EXE_LIBS = \ | |
-ltwoPhaseInterfaceProperties \ | |
+ -linterfaceProperties \ | |
-lincompressibleTransportModels \ | |
-lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options | |
--- a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options | |
+++ b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options | |
@@ -10,6 +10,7 @@ | |
-I$(LIB_SRC)/dynamicFvMesh/lnInclude | |
EXE_LIBS = \ | |
+ -linterfaceProperties \ | |
-ltwoPhaseInterfaceProperties \ | |
-lincompressibleTransportModels \ | |
-lincompressibleTurbulenceModel \ | |
diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options | |
--- a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options | |
+++ b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options | |
@@ -8,6 +8,7 @@ | |
-I$(LIB_SRC)/meshTools/lnInclude | |
EXE_LIBS = \ | |
+ -linterfaceProperties \ | |
-ltwoPhaseInterfaceProperties \ | |
-lincompressibleTransportModels \ | |
-lincompressibleTurbulenceModel \ | |
diff --git a/applications/solvers/multiphase/interMixingFoam/Make/options b/applications/solvers/multiphase/interMixingFoam/Make/options | |
--- a/applications/solvers/multiphase/interMixingFoam/Make/options | |
+++ b/applications/solvers/multiphase/interMixingFoam/Make/options | |
@@ -16,4 +16,5 @@ | |
-lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleLESModels \ | |
+ -lincompressibleTurbulenceModel \ | |
-lfiniteVolume | |
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options | |
--- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options | |
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options | |
@@ -7,6 +7,7 @@ | |
-I$(LIB_SRC)/finiteVolume/lnInclude | |
EXE_LIBS = \ | |
+ -linterfaceProperties \ | |
-ltwoPhaseInterfaceProperties \ | |
-lincompressibleTransportModels \ | |
-lincompressibleTurbulenceModel \ | |
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options | |
--- a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options | |
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options | |
@@ -21,5 +21,6 @@ | |
-lincompressibleTransportModels \ | |
-lcompressibleMultiphaseEulerianInterfacialModels \ | |
/*-lcompressibleKineticTheoryModel*/ \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleLESModels \ | |
-lfiniteVolume | |
diff --git a/applications/utilities/mesh/generation/blockMesh/Make/options b/applications/utilities/mesh/generation/blockMesh/Make/options | |
--- a/applications/utilities/mesh/generation/blockMesh/Make/options | |
+++ b/applications/utilities/mesh/generation/blockMesh/Make/options | |
@@ -6,4 +6,5 @@ | |
EXE_LIBS = \ | |
-lblockMesh \ | |
-lmeshTools \ | |
+ -lfiniteVolume \ | |
-ldynamicMesh | |
diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options | |
--- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options | |
+++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options | |
@@ -9,10 +9,12 @@ | |
EXE_LIBS = \ | |
$(FOAM_LIBBIN)/postCalc.o \ | |
-lincompressibleTransportModels \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleLESModels \ | |
-lbasicThermophysicalModels \ | |
-lspecie \ | |
+ -lcompressibleTurbulenceModel \ | |
-lcompressibleRASModels \ | |
-lcompressibleLESModels \ | |
-lfiniteVolume \ | |
diff --git a/applications/utilities/postProcessing/turbulence/R/Make/options b/applications/utilities/postProcessing/turbulence/R/Make/options | |
--- a/applications/utilities/postProcessing/turbulence/R/Make/options | |
+++ b/applications/utilities/postProcessing/turbulence/R/Make/options | |
@@ -5,6 +5,7 @@ | |
-I$(LIB_SRC)/finiteVolume/lnInclude | |
EXE_LIBS = \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleTransportModels \ | |
-lfiniteVolume \ | |
diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options | |
--- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options | |
+++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options | |
@@ -5,6 +5,7 @@ | |
-I$(LIB_SRC)/finiteVolume/lnInclude | |
EXE_LIBS = \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleTransportModels \ | |
-lfiniteVolume \ | |
diff --git a/applications/utilities/postProcessing/velocityField/Pe/Make/options b/applications/utilities/postProcessing/velocityField/Pe/Make/options | |
--- a/applications/utilities/postProcessing/velocityField/Pe/Make/options | |
+++ b/applications/utilities/postProcessing/velocityField/Pe/Make/options | |
@@ -11,10 +11,12 @@ | |
EXE_LIBS = \ | |
$(FOAM_LIBBIN)/postCalc.o \ | |
-lincompressibleTransportModels \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleLESModels \ | |
-lbasicThermophysicalModels \ | |
-lspecie \ | |
+ -lcompressibleTurbulenceModel \ | |
-lcompressibleRASModels \ | |
-lcompressibleLESModels \ | |
-lfiniteVolume \ | |
diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options | |
--- a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options | |
+++ b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options | |
@@ -8,6 +8,7 @@ | |
EXE_LIBS = \ | |
-lcompressibleRASModels \ | |
+ -lcompressibleTurbulenceModel \ | |
-lreactionThermophysicalModels \ | |
-lfiniteVolume \ | |
-lgenericPatchFields \ | |
diff --git a/applications/utilities/postProcessing/wall/wallShearStress/Make/options b/applications/utilities/postProcessing/wall/wallShearStress/Make/options | |
--- a/applications/utilities/postProcessing/wall/wallShearStress/Make/options | |
+++ b/applications/utilities/postProcessing/wall/wallShearStress/Make/options | |
@@ -6,9 +6,11 @@ | |
EXE_LIBS = \ | |
-lincompressibleTransportModels \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lbasicThermophysicalModels \ | |
-lspecie \ | |
+ -lcompressibleTurbulenceModel \ | |
-lcompressibleRASModels \ | |
-lfiniteVolume \ | |
-lgenericPatchFields | |
diff --git a/applications/utilities/postProcessing/wall/yPlusLES/Make/options b/applications/utilities/postProcessing/wall/yPlusLES/Make/options | |
--- a/applications/utilities/postProcessing/wall/yPlusLES/Make/options | |
+++ b/applications/utilities/postProcessing/wall/yPlusLES/Make/options | |
@@ -8,6 +8,7 @@ | |
EXE_LIBS = \ | |
-lincompressibleLESModels \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleTransportModels \ | |
-lfiniteVolume \ | |
-lgenericPatchFields | |
diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options | |
--- a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options | |
+++ b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options | |
@@ -9,9 +9,11 @@ | |
EXE_LIBS = \ | |
-lincompressibleTransportModels \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lbasicThermophysicalModels \ | |
-lspecie \ | |
+ -lcompressibleTurbulenceModel \ | |
-lcompressibleRASModels \ | |
-lfiniteVolume \ | |
-lgenericPatchFields \ | |
diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/Make/options b/applications/utilities/preProcessing/applyBoundaryLayer/Make/options | |
--- a/applications/utilities/preProcessing/applyBoundaryLayer/Make/options | |
+++ b/applications/utilities/preProcessing/applyBoundaryLayer/Make/options | |
@@ -8,6 +8,7 @@ | |
EXE_LIBS = \ | |
-lfiniteVolume \ | |
+ -lincompressibleTurbulenceModel \ | |
-lincompressibleRASModels \ | |
-lincompressibleTransportModels \ | |
-lgenericPatchFields \ | |
diff --git a/bin/addr2line4Mac.py b/bin/addr2line4Mac.py | |
new file mode 100755 | |
--- /dev/null | |
+++ b/bin/addr2line4Mac.py | |
@@ -0,0 +1,30 @@ | |
+#! /usr/bin/python | |
+ | |
+import sys | |
+filename=sys.argv[1] | |
+address=sys.argv[2] | |
+import re | |
+ | |
+import subprocess | |
+ | |
+p = subprocess.Popen("gdb -batch -x /dev/stdin", | |
+ shell=True, | |
+ bufsize=0, | |
+ stdin=subprocess.PIPE, | |
+ stdout=subprocess.PIPE, | |
+ close_fds=True) | |
+ | |
+(child_stdin, child_stdout) = (p.stdin, p.stdout) | |
+child_stdin.write("set sharedlibrary preload-libraries no\n") | |
+child_stdin.write("file "+filename+"\n") | |
+child_stdin.write("info line *"+address+"\n") | |
+result=child_stdout.readline() | |
+ | |
+answer="??:0" | |
+ | |
+match=re.compile('Line (.+) of "(.+)" starts at').match(result) | |
+if match: | |
+ answer=match.group(2)+":"+match.group(1) | |
+print answer, | |
+ | |
+sys.exit(255) | |
diff --git a/etc/bashrc b/etc/bashrc | |
--- a/etc/bashrc | |
+++ b/etc/bashrc | |
@@ -199,6 +199,10 @@ | |
#- Clean MANPATH | |
cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` && MANPATH="$cleaned" | |
+if [[ `uname -s` == "Darwin" ]] | |
+then | |
+ cleaned=`$foamClean "$DYLD_LIBRARY_PATH" "$foamOldDirs"` && DYLD_LIBRARY_PATH="$cleaned" | |
+fi | |
export PATH LD_LIBRARY_PATH MANPATH | |
diff --git a/etc/config/settings.sh b/etc/config/settings.sh | |
--- a/etc/config/settings.sh | |
+++ b/etc/config/settings.sh | |
@@ -46,6 +46,10 @@ | |
while [ $# -ge 1 ] | |
do | |
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH | |
+ if [ "$WM_ARCH_BASE" == "darwin" ] | |
+ then | |
+ export DYLD_LIBRARY_PATH=$1:$DYLD_LIBRARY_PATH | |
+ fi | |
shift | |
done | |
} | |
@@ -141,6 +145,48 @@ | |
export WM_LDFLAGS='-mabi=64 -G0' | |
;; | |
+Darwin) | |
+ export WM_ARCH_BASE=darwin | |
+ case `uname -p` in | |
+ powerpc) | |
+ export WM_ARCH=darwinPpc | |
+ ;; | |
+ i386) | |
+ export WM_ARCH=darwinIntel | |
+ case $WM_ARCH_OPTION in | |
+ 32) | |
+ export WM_COMPILER_LIB_ARCH=32 | |
+ export WM_CC='gcc' | |
+ export WM_CXX='g++' | |
+ export WM_CFLAGS='-m32 -fPIC' | |
+ export WM_CXXFLAGS='-m32 -fPIC' | |
+ export WM_LDFLAGS='-m32' | |
+ ;; | |
+ 64) | |
+ WM_ARCH=darwinIntel64 | |
+ export WM_COMPILER_LIB_ARCH=64 | |
+ export WM_CC='gcc' | |
+ export WM_CXX='g++' | |
+ export WM_CFLAGS='-m64 -fPIC' | |
+ export WM_CXXFLAGS='-m64 -fPIC' | |
+ export WM_LDFLAGS='-m64' | |
+ ;; | |
+ *) | |
+ echo Unknown WM_ARCH_OPTION $WM_ARCH_OPTION, should be 32 or 64 | |
+ ;; | |
+ esac | |
+ ;; | |
+ *) | |
+ echo "Unknown architecture "`uname -p` "for Darwin" | |
+ esac | |
+ | |
+ # export WM_COMPILER= | |
+ # export WM_MPLIB=OPENMPI | |
+ | |
+ MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion` | |
+ ;; | |
+ | |
+ | |
*) # an unsupported operating system | |
cat <<USAGE | |
diff --git a/src/OSspecific/POSIX/POSIX.C b/src/OSspecific/POSIX/POSIX.C | |
--- a/src/OSspecific/POSIX/POSIX.C | |
+++ b/src/OSspecific/POSIX/POSIX.C | |
@@ -53,7 +53,10 @@ | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#include <dlfcn.h> | |
+#ifndef darwin | |
#include <link.h> | |
+#else | |
+#endif | |
#include <netinet/in.h> | |
@@ -1170,6 +1173,14 @@ | |
} | |
void* handle = ::dlopen(lib.c_str(), RTLD_LAZY|RTLD_GLOBAL); | |
+#ifdef darwin | |
+ if(!handle && lib.ext()=="so") { | |
+ fileName lName=lib.lessExt()+".dylib"; | |
+ handle = | |
+ dlopen(lName.c_str(), RTLD_LAZY|RTLD_GLOBAL); | |
+ } | |
+#endif | |
+ | |
if (!handle && check) | |
{ | |
WarningIn("dlOpen(const fileName&, const bool)") | |
@@ -1263,9 +1274,15 @@ | |
void *data | |
) | |
{ | |
+#ifdef darwin | |
+ WarningIn("collectLibsCallback") | |
+ << "Not yet implemented for Mac OS X" | |
+ << Foam::endl; | |
+#else | |
Foam::DynamicList<Foam::fileName>* ptr = | |
reinterpret_cast<Foam::DynamicList<Foam::fileName>*>(data); | |
ptr->append(info->dlpi_name); | |
+#endif | |
return 0; | |
} | |
@@ -1273,7 +1290,13 @@ | |
Foam::fileNameList Foam::dlLoaded() | |
{ | |
DynamicList<fileName> libs; | |
+#ifdef darwin | |
+ WarningIn("dlLoaded") | |
+ << "Not yet implemented for Mac OS X" | |
+ << endl; | |
+#else | |
dl_iterate_phdr(collectLibsCallback, &libs); | |
+#endif | |
if (POSIX::debug) | |
{ | |
std::cout | |
diff --git a/src/OSspecific/POSIX/clockTime/clockTime.H b/src/OSspecific/POSIX/clockTime/clockTime.H | |
--- a/src/OSspecific/POSIX/clockTime/clockTime.H | |
+++ b/src/OSspecific/POSIX/clockTime/clockTime.H | |
@@ -37,6 +37,9 @@ | |
#define clockTime_H | |
#include <sys/types.h> | |
+#ifdef darwin | |
+#include <sys/time.h> | |
+#endif | |
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | |
diff --git a/src/OSspecific/POSIX/fileStat.C b/src/OSspecific/POSIX/fileStat.C | |
--- a/src/OSspecific/POSIX/fileStat.C | |
+++ b/src/OSspecific/POSIX/fileStat.C | |
@@ -29,7 +29,9 @@ | |
#include <signal.h> | |
#include <unistd.h> | |
+#ifndef darwin | |
#include <sys/sysmacros.h> | |
+#endif | |
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // | |
diff --git a/src/OSspecific/POSIX/printStack.C b/src/OSspecific/POSIX/printStack.C | |
--- a/src/OSspecific/POSIX/printStack.C | |
+++ b/src/OSspecific/POSIX/printStack.C | |
@@ -31,8 +31,11 @@ | |
#include "readHexLabel.H" | |
#include <cxxabi.h> | |
+#ifndef darwin | |
#include <execinfo.h> | |
+#endif | |
#include <dlfcn.h> | |
+#include <string.h> | |
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | |
@@ -53,11 +56,22 @@ | |
for (label cnt = 0; cnt <= line; cnt++) | |
{ | |
char buffer[MAX]; | |
+ | |
char* s = fgets(buffer, MAX-1, cmdPipe); | |
if (s == NULL) | |
{ | |
+#ifdef darwin | |
+ // workaround for the Python-Script | |
+ for(int i=0;i<MAX;i++) { | |
+ if(buffer[i]=='\n') { | |
+ buffer[i]='\0'; | |
+ } | |
+ } | |
+ return buffer; | |
+#else | |
return ""; | |
+#endif | |
} | |
if (cnt == line) | |
@@ -86,7 +100,11 @@ | |
{ | |
word myAddress = address; | |
+#ifndef darwin | |
if (filename.ext() == "so") | |
+#else | |
+ if (filename.ext() == "dylib") | |
+#endif | |
{ | |
// Convert offset into .so into offset into executable. | |
@@ -97,7 +115,7 @@ | |
dladdr(addr, &info); | |
- unsigned long offset = ulong(info.dli_fbase); | |
+ unsigned long offset = (unsigned long)(info.dli_fbase); | |
IStringStream addressStr(address.substr(2)); | |
label addressValue = readHexLabel(addressStr); | |
@@ -113,7 +131,11 @@ | |
{ | |
string line = pOpen | |
( | |
+#ifndef darwin | |
"addr2line -f --demangle=auto --exe " | |
+#else | |
+ "addr2line4Mac.py " | |
+#endif | |
+ filename | |
+ " " | |
+ myAddress, | |
@@ -151,7 +173,11 @@ | |
{ | |
string fcnt = pOpen | |
( | |
+#ifndef darwin | |
"addr2line -f --demangle=auto --exe " | |
+#else | |
+ "addr2line4Mac.py " | |
+#endif | |
+ filename | |
+ " " | |
+ address | |
@@ -166,6 +192,102 @@ | |
os << "Uninterpreted: " << raw.c_str(); | |
} | |
+#ifdef darwin | |
+ | |
+// Trying to emulate the original backtrace and backtrace_symbol from the glibc | |
+// After an idea published by Rush Manbert at http://lists.apple.com/archives/xcode-users/2006/Apr/msg00528.html | |
+ | |
+template<int level> | |
+void *getStackAddress() | |
+{ | |
+ const unsigned int stackLevel=level; | |
+ return ( | |
+ __builtin_frame_address(level) | |
+ ? __builtin_return_address(stackLevel) | |
+ : (void *)0 | |
+ ); | |
+}; | |
+ | |
+#define GET_STACK_ADDRESS(lvl) \ | |
+ case lvl: {return getStackAddress<lvl>(); break; } | |
+ | |
+// please don't laugh. For some reason this is necessary (the compiler won't accept it otherwise) | |
+void *getStackAddress(int level) | |
+{ | |
+ switch(level) { | |
+ GET_STACK_ADDRESS(0); | |
+ GET_STACK_ADDRESS(1); | |
+ GET_STACK_ADDRESS(2); | |
+ GET_STACK_ADDRESS(3); | |
+ GET_STACK_ADDRESS(4); | |
+ GET_STACK_ADDRESS(5); | |
+ GET_STACK_ADDRESS(6); | |
+ GET_STACK_ADDRESS(7); | |
+ GET_STACK_ADDRESS(8); | |
+ GET_STACK_ADDRESS(9); | |
+ GET_STACK_ADDRESS(10); | |
+ GET_STACK_ADDRESS(11); | |
+ GET_STACK_ADDRESS(12); | |
+ GET_STACK_ADDRESS(13); | |
+ GET_STACK_ADDRESS(14); | |
+ GET_STACK_ADDRESS(15); | |
+ GET_STACK_ADDRESS(16); | |
+ GET_STACK_ADDRESS(17); | |
+ GET_STACK_ADDRESS(18); | |
+ GET_STACK_ADDRESS(19); | |
+ GET_STACK_ADDRESS(20); | |
+ GET_STACK_ADDRESS(21); | |
+ default: | |
+ return (void *)0; | |
+ break; | |
+ } | |
+} | |
+ | |
+unsigned backtrace(void **bt, unsigned maxAddrs) | |
+{ | |
+ unsigned valid=0; | |
+ bool ok=true; | |
+ | |
+ for(int level=0;level<maxAddrs;level++) { | |
+ if(ok) { | |
+ bt[level]=getStackAddress(level); | |
+ | |
+ if(bt[level]!=(void *)0) { | |
+ valid=level; | |
+ } else { | |
+ ok=false; | |
+ } | |
+ } else { | |
+ bt[level]=(void *)0; | |
+ } | |
+ } | |
+ | |
+ return valid; | |
+} | |
+ | |
+// This function is a potential memory leak. But I don't care because the program is terminating anyway | |
+char **backtrace_symbols(void **bt,unsigned nr) | |
+{ | |
+ char **strings=(char **)malloc(sizeof(char *)*nr); | |
+ | |
+ for(unsigned i=0;i<nr;i++) { | |
+ Dl_info info; | |
+ int result=dladdr(bt[i],&info); | |
+ | |
+ char tmp[1000]; | |
+#ifdef darwinIntel64 | |
+ sprintf(tmp,"%s(%s+%p) [%p]",info.dli_fname,info.dli_sname,(void *)((unsigned long)bt[i]-(unsigned long)info.dli_saddr),bt[i]); | |
+#else | |
+ sprintf(tmp,"%s(%s+%p) [%p]",info.dli_fname,info.dli_sname,(void *)((unsigned int)bt[i]-(unsigned int)info.dli_saddr),bt[i]); | |
+#endif | |
+ strings[i]=(char *)malloc(strlen(tmp)+1); | |
+ strcpy(strings[i],tmp); | |
+ } | |
+ | |
+ return strings; | |
+} | |
+ | |
+#endif | |
void error::printStack(Ostream& os) | |
{ | |
diff --git a/src/OSspecific/POSIX/signals/sigFpe.C b/src/OSspecific/POSIX/signals/sigFpe.C | |
--- a/src/OSspecific/POSIX/signals/sigFpe.C | |
+++ b/src/OSspecific/POSIX/signals/sigFpe.C | |
@@ -42,6 +42,11 @@ | |
# include <sigfpe.h> | |
+#elif defined(__APPLE__) | |
+ | |
+// # include <fenv.h> | |
+#include <xmmintrin.h> | |
+ | |
#endif | |
#include <stdint.h> | |
@@ -94,7 +99,7 @@ | |
#endif | |
-#ifdef LINUX_GNUC | |
+#if defined(LINUX_GNUC) || defined(__APPLE__) | |
void Foam::sigFpe::sigHandler(int) | |
{ | |
@@ -227,6 +232,28 @@ | |
NULL | |
); | |
+# elif defined(__APPLE__) | |
+ | |
+ struct sigaction newAction; | |
+ newAction.sa_handler = sigHandler; | |
+ newAction.sa_flags = SA_NODEFER; | |
+ sigemptyset(&newAction.sa_mask); | |
+ if (sigaction(SIGFPE, &newAction, &oldAction_) < 0) | |
+ { | |
+ FatalErrorIn | |
+ ( | |
+ "Foam::sigFpe::set()" | |
+ ) << "Cannot set SIGFPE trapping" | |
+ << abort(FatalError); | |
+ } | |
+ _MM_SET_EXCEPTION_MASK(_MM_GET_EXCEPTION_MASK() & ~_MM_MASK_INVALID); | |
+ _MM_SET_EXCEPTION_MASK(_MM_GET_EXCEPTION_MASK() & ~_MM_MASK_DIV_ZERO); | |
+ | |
+ _mm_setcsr( _MM_MASK_MASK &~ | |
+ (_MM_MASK_OVERFLOW|_MM_MASK_INVALID|_MM_MASK_DIV_ZERO) ); | |
+ | |
+ supported=true; | |
+ | |
# endif | |
diff --git a/src/OSspecific/POSIX/signals/sigFpe.H b/src/OSspecific/POSIX/signals/sigFpe.H | |
--- a/src/OSspecific/POSIX/signals/sigFpe.H | |
+++ b/src/OSspecific/POSIX/signals/sigFpe.H | |
@@ -82,7 +82,7 @@ | |
// Static data members | |
-# ifdef LINUX_GNUC | |
+# if defined(LINUX_GNUC) || defined(__APPLE__) | |
//- Handler for caught signals | |
static void sigHandler(int); | |
diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C | |
--- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C | |
+++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C | |
@@ -50,6 +50,11 @@ | |
const char* const Foam::dynamicCode::topDirName = "dynamicCode"; | |
+#ifndef darwin | |
+const char* const Foam::dynamicCode::dynamicLibExtension = ".so"; | |
+#else | |
+const char* const Foam::dynamicCode::dynamicLibExtension = ".dylib"; | |
+#endif | |
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // | |
@@ -334,7 +339,7 @@ | |
Foam::fileName Foam::dynamicCode::libRelPath() const | |
{ | |
- return codeRelPath()/libSubDir_/"lib" + codeName_ + ".so"; | |
+ return codeRelPath()/libSubDir_/"lib" + codeName_ + dynamicLibExtension; | |
} | |
diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.H b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.H | |
--- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.H | |
+++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.H | |
@@ -109,7 +109,8 @@ | |
//- Top-level directory name for copy/compiling | |
static const char* const topDirName; | |
- | |
+ static const char* const dynamicLibExtension; | |
+ | |
// Protected Member Functions | |
//- Copy lines while expanding variables | |
@@ -221,7 +222,7 @@ | |
// Corresponds to codeRoot()/libSubDir()/lib\<codeName\>.so | |
fileName libPath() const | |
{ | |
- return codeRoot_/libSubDir_/"lib" + codeName_ + ".so"; | |
+ return codeRoot_/libSubDir_/"lib" + codeName_ + dynamicLibExtension; | |
} | |
//- Path for specified code name relative to \$FOAM_CASE | |
diff --git a/src/OpenFOAM/primitives/Scalar/doubleFloat.H b/src/OpenFOAM/primitives/Scalar/doubleFloat.H | |
--- a/src/OpenFOAM/primitives/Scalar/doubleFloat.H | |
+++ b/src/OpenFOAM/primitives/Scalar/doubleFloat.H | |
@@ -31,6 +31,16 @@ | |
#include <cmath> | |
+#ifndef DUMMY_SCALAR_FUNCTIONS | |
+#define DUMMY_SCALAR_FUNCTIONS | |
+inline float j0f(float x) { return float(j0(double(x)));} | |
+inline float j1f(float x) { return float(j1(double(x)));} | |
+inline float y0f(float x) { return float(y0(double(x)));} | |
+inline float y1f(float x) { return float(y1(double(x)));} | |
+inline float jnf(const int n, const float s) { return float(jn(n, double(s))); } | |
+inline float ynf(const int n, const float s) { return float(yn(n, double(s))); } | |
+#endif | |
+ | |
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | |
namespace Foam | |
diff --git a/src/conversion/ensight/part/ensightPart.C b/src/conversion/ensight/part/ensightPart.C | |
--- a/src/conversion/ensight/part/ensightPart.C | |
+++ b/src/conversion/ensight/part/ensightPart.C | |
@@ -51,7 +51,7 @@ | |
{ | |
const label id = idList[i]; | |
- if (id >= field.size() || isnan(field[id])) | |
+ if (id >= field.size() || std::isnan(field[id])) | |
{ | |
return false; | |
} | |
diff --git a/src/conversion/ensight/part/ensightPartIO.C b/src/conversion/ensight/part/ensightPartIO.C | |
--- a/src/conversion/ensight/part/ensightPartIO.C | |
+++ b/src/conversion/ensight/part/ensightPartIO.C | |
@@ -63,7 +63,7 @@ | |
{ | |
forAll(idList, i) | |
{ | |
- if (idList[i] >= field.size() || isnan(field[idList[i]])) | |
+ if (idList[i] >= field.size() || std::isnan(field[idList[i]])) | |
{ | |
os.writeUndef(); | |
} | |
@@ -80,7 +80,7 @@ | |
// no idList => perNode | |
forAll(field, i) | |
{ | |
- if (isnan(field[i])) | |
+ if (std::isnan(field[i])) | |
{ | |
os.writeUndef(); | |
} | |
diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C | |
--- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C | |
+++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C | |
@@ -280,7 +280,7 @@ | |
// Send all fieldNames. This has to be exactly the same set as is | |
// being received! | |
const GeoField& fld = | |
- subsetter.baseMesh().lookupObject<GeoField>(fieldNames[i]); | |
+ subsetter.baseMesh().objectRegistry::lookupObject<GeoField>(fieldNames[i]); | |
tmp<GeoField> tsubfld = subsetter.interpolate(fld); | |
diff --git a/src/parallel/decompose/ptscotchDecomp/Make/options b/src/parallel/decompose/ptscotchDecomp/Make/options | |
--- a/src/parallel/decompose/ptscotchDecomp/Make/options | |
+++ b/src/parallel/decompose/ptscotchDecomp/Make/options | |
@@ -8,5 +8,9 @@ | |
-I/usr/include/scotch \ | |
-I../decompositionMethods/lnInclude | |
+ifneq ($(WM_ARCH_BASE),darwin) | |
+RTLIB=-lrt | |
+endif | |
+ | |
LIB_LIBS = \ | |
- -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lrt | |
+ -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit $(RTLIB) | |
diff --git a/src/parallel/decompose/scotchDecomp/Make/options b/src/parallel/decompose/scotchDecomp/Make/options | |
--- a/src/parallel/decompose/scotchDecomp/Make/options | |
+++ b/src/parallel/decompose/scotchDecomp/Make/options | |
@@ -12,5 +12,9 @@ | |
-I/usr/include/scotch \ | |
-I../decompositionMethods/lnInclude | |
+ifneq ($(WM_ARCH_BASE),darwin) | |
+RTLIB=-lrt | |
+endif | |
+ | |
LIB_LIBS = \ | |
- -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt | |
+ -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit $(RTLIB) | |
diff --git a/wmake/Makefile b/wmake/Makefile | |
--- a/wmake/Makefile | |
+++ b/wmake/Makefile | |
@@ -91,7 +91,11 @@ | |
LIB = libNULL | |
# Shared library extension | |
+ifeq ($(WM_ARCH_BASE),darwin) | |
+SO = dylib | |
+else | |
SO = so | |
+endif | |
# Project executable | |
EXE = $(WM_PROJECT).out | |
diff --git a/wmake/rules/darwinIntel64Gcc/c b/wmake/rules/darwinIntel64Gcc/c | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/c | |
@@ -0,0 +1,16 @@ | |
+.SUFFIXES: .c .h | |
+ | |
+cWARN = -Wall | |
+ | |
+cc = gcc -m64 -fsignaling-nans -ftrapping-math | |
+ | |
+include $(RULES)/c$(WM_COMPILE_OPTION) | |
+ | |
+cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC -Ddarwin | |
+ | |
+ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ | |
+ | |
+LINK_LIBS = $(cDBUG) | |
+ | |
+LINKLIBSO = $(cc) -dynamiclib -flat_namespace -undefined suppress | |
+LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs | |
diff --git a/wmake/rules/darwinIntel64Gcc/c++ b/wmake/rules/darwinIntel64Gcc/c++ | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/c++ | |
@@ -0,0 +1,22 @@ | |
+.SUFFIXES: .C .cxx .cc .cpp | |
+ | |
+c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor | |
+ | |
+CC = g++ -m64 -fsignaling-nans -ftrapping-math | |
+ | |
+include $(RULES)/c++$(WM_COMPILE_OPTION) | |
+ | |
+ptFLAGS = -DNoRepository -ftemplate-depth-100 | |
+ | |
+c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -Ddarwin | |
+ | |
+Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ | |
+cxxtoo = $(Ctoo) | |
+cctoo = $(Ctoo) | |
+cpptoo = $(Ctoo) | |
+ | |
+LINK_LIBS = $(c++DBUG) -lpthread | |
+ | |
+LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup | |
+# LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lOpenFOAM -L$(FOAM_MPI_LIBBIN) -lPstream | |
+LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN)/$(FOAM_MPI) -lPstream | |
diff --git a/wmake/rules/darwinIntel64Gcc/c++Debug b/wmake/rules/darwinIntel64Gcc/c++Debug | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/c++Debug | |
@@ -0,0 +1,2 @@ | |
+c++DBUG = -ggdb2 -DFULLDEBUG | |
+c++OPT = -O0 -fdefault-inline | |
diff --git a/wmake/rules/darwinIntel64Gcc/c++Opt b/wmake/rules/darwinIntel64Gcc/c++Opt | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/c++Opt | |
@@ -0,0 +1,5 @@ | |
+c++DBUG = | |
+c++OPT = -O2 | |
+# c++OPT = -O3 | |
+#c++OPT = -march=nocona -O3 | |
+# -ftree-vectorize -ftree-vectorizer-verbose=3 | |
diff --git a/wmake/rules/darwinIntel64Gcc/c++Prof b/wmake/rules/darwinIntel64Gcc/c++Prof | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/c++Prof | |
@@ -0,0 +1,2 @@ | |
+c++DBUG = -pg | |
+c++OPT = -O2 | |
diff --git a/wmake/rules/darwinIntel64Gcc/cDebug b/wmake/rules/darwinIntel64Gcc/cDebug | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/cDebug | |
@@ -0,0 +1,2 @@ | |
+cDBUG = -ggdb -DFULLDEBUG | |
+cOPT = -O1 -fdefault-inline -finline-functions | |
diff --git a/wmake/rules/darwinIntel64Gcc/cOpt b/wmake/rules/darwinIntel64Gcc/cOpt | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/cOpt | |
@@ -0,0 +1,3 @@ | |
+cDBUG = | |
+cOPT = -O2 | |
+# cOPT = -O3 | |
diff --git a/wmake/rules/darwinIntel64Gcc/cProf b/wmake/rules/darwinIntel64Gcc/cProf | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/cProf | |
@@ -0,0 +1,2 @@ | |
+cDBUG = -pg | |
+cOPT = -O2 | |
diff --git a/wmake/rules/darwinIntel64Gcc/general b/wmake/rules/darwinIntel64Gcc/general | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/general | |
@@ -0,0 +1,9 @@ | |
+CPP = cpp --traditional-cpp $(GFLAGS) | |
+LD = ld | |
+ | |
+PROJECT_LIBS = -l$(WM_PROJECT) -ldl | |
+ | |
+include $(GENERAL_RULES)/standard | |
+ | |
+include $(RULES)/c | |
+include $(RULES)/c++ | |
diff --git a/wmake/rules/darwinIntel64Gcc/mplib b/wmake/rules/darwinIntel64Gcc/mplib | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/mplib | |
@@ -0,0 +1,3 @@ | |
+PFLAGS = | |
+PINC = | |
+PLIBS = | |
diff --git a/wmake/rules/darwinIntel64Gcc/mplibOPENMPI b/wmake/rules/darwinIntel64Gcc/mplibOPENMPI | |
new file mode 100644 | |
--- /dev/null | |
+++ b/wmake/rules/darwinIntel64Gcc/mplibOPENMPI | |
@@ -0,0 +1,3 @@ | |
+PFLAGS = -DOMPI_SKIP_MPICXX | |
+PINC = -I$(MPI_ARCH_PATH)/include | |
+PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment