diff --git a/Allwmake b/Allwmake
index 91875325538af126680046f2b9d33164cde8d5a8..e9e7995414a52e006b0da832e68af052ef7c108a 100755
--- a/Allwmake
+++ b/Allwmake
@@ -1,37 +1,43 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation without documentation by default
+genDoc=0
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
 wmakeCheckPwd "$WM_PROJECT_DIR" || {
-    echo "Error: Current directory is not \$WM_PROJECT_DIR"
+    echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR"
     echo "    The environment variables are inconsistent with the installation."
     echo "    Check the OpenFOAM entries in your dot-files and source them."
     exit 1
 }
 
 [ -n "$FOAM_EXT_LIBBIN" ] || {
-    echo "Error: FOAM_EXT_LIBBIN not set"
+    echo "Allwmake error: FOAM_EXT_LIBBIN not set"
     echo "    Check the OpenFOAM entries in your dot-files and source them."
     exit 1
 }
 
-# wmake is required for subsequent targets
-( cd wmake/src && make )
+# Compile wmake support applications
+(cd wmake/src && make)
 
-# build ThirdParty sources
+# Compile ThirdParty libraries and applications
 if [ -d "$WM_THIRD_PARTY_DIR" ]
 then
     $WM_THIRD_PARTY_DIR/Allwmake
 else
-    echo "no ThirdParty sources found - skipping"
+    echo "Allwmake: no ThirdParty directory found - skipping"
 fi
 
-# build OpenFOAM libraries and applications
-src/Allwmake $*
-applications/Allwmake $*
+# Compile OpenFOAM libraries and applications
+src/Allwmake $targetType $*
+
+# Compile OpenFOAM libraries and applications
+applications/Allwmake $targetType $*
+
+# Optionally build OpenFOAM Doxygen documentation
+[ $genDoc -eq 1 ] && doc/Allwmake
 
-if [ "$1" = doc ]
-then
-    doc/Allwmake $*
-fi
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/README.org b/README.org
index fe0240d36d40a91b3457d5c4414d6f292128481a..b6b3bfb9d09c96940140534fd44a88c23b61819e 100644
--- a/README.org
+++ b/README.org
@@ -2,7 +2,7 @@
 #
 #+TITLE:            OpenFOAM README for version dev
 #+AUTHOR:               The OpenFOAM Foundation
-#+DATE:                     10th December 2014
+#+DATE:                     14th December 2014
 #+LINK:                  http://www.openfoam.org
 #+OPTIONS: author:nil ^:{}
 # Copyright (c) 2014 OpenFOAM Foundation.
@@ -28,10 +28,10 @@
     [[http://www.OpenFOAM.org/git.php]]
 
 * Documentation
-  [[http://www.OpenFOAM.com/docs]]
-
-* Support and development contracts
-  [[http://www.OpenFOAM.com/support]]
+  [[http://www.OpenFOAM.org/docs]]
 
 * Reporting Bugs in OpenFOAM
-  [[http://www.OpenFOAM.com/bugs]]
+  [[http://www.OpenFOAM.org/bugs]]
+
+* Contacting the OpenFOAM Foundation
+  http://www.openfoam.org/contact
diff --git a/applications/Allwmake b/applications/Allwmake
index 7f7ac6718da35486635f1bf6665f989a82fce3ce..f23a233b64eede87833f5f9e6a6149e30428e6e8 100755
--- a/applications/Allwmake
+++ b/applications/Allwmake
@@ -1,22 +1,27 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
 wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
-    echo "Error: Current directory is not \$WM_PROJECT_DIR/applications"
+    echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/applications"
     echo "    The environment variables are inconsistent with the installation."
     echo "    Check the OpenFOAM entries in your dot-files and source them."
     exit 1
 }
 
 [ -n "$FOAM_EXT_LIBBIN" ] || {
-    echo "Error: FOAM_EXT_LIBBIN not set"
+    echo "Allwmake error: FOAM_EXT_LIBBIN not set"
     echo "    Check the OpenFOAM entries in your dot-files and source them."
     exit 1
 }
 
 set -x
 
-wmake all utilities $*
-wmake all solvers $*
+wmake -all utilities $*
+wmake -all solvers $*
+
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/combustion/reactingFoam/Allwmake b/applications/solvers/combustion/reactingFoam/Allwmake
deleted file mode 100755
index b60b5b625037faa828622d112e17f23e68e6a260..0000000000000000000000000000000000000000
--- a/applications/solvers/combustion/reactingFoam/Allwmake
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake rhoReactingFoam
-wmake rhoReactingBuoyantFoam
-wmake LTSReactingFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwclean b/applications/solvers/compressible/rhoCentralFoam/Allwclean
index cc5398c04ed05e66a2bf32e438228d26f49313e1..1a0374d96d669b4b6357847f18f447460ecf2e42 100755
--- a/applications/solvers/compressible/rhoCentralFoam/Allwclean
+++ b/applications/solvers/compressible/rhoCentralFoam/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso BCs
diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwmake b/applications/solvers/compressible/rhoCentralFoam/Allwmake
index 33e08e10761a33e35b3b3160be42f380e085cae6..5c4ed20c2487389cb3cdac233b10d22a428d3c48 100755
--- a/applications/solvers/compressible/rhoCentralFoam/Allwmake
+++ b/applications/solvers/compressible/rhoCentralFoam/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 (wmake libso BCs && wmake && wmake rhoCentralDyMFoam)
diff --git a/applications/solvers/compressible/rhoPimpleFoam/Allwmake b/applications/solvers/compressible/rhoPimpleFoam/Allwmake
deleted file mode 100755
index 1b272c17f07d29f88d7d61cf88a3e55cbfd0243b..0000000000000000000000000000000000000000
--- a/applications/solvers/compressible/rhoPimpleFoam/Allwmake
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake rhoPimplecFoam
-wmake rhoLTSPimpleFoam
-wmake rhoPimpleDyMFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/compressible/rhoSimpleFoam/Allwclean b/applications/solvers/compressible/rhoSimpleFoam/Allwclean
deleted file mode 100755
index a1fd479e12700c0e98e56ad1df4d6e0a7616e545..0000000000000000000000000000000000000000
--- a/applications/solvers/compressible/rhoSimpleFoam/Allwclean
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wclean
-wclean rhoPorousSimpleFoam
-wclean rhoSimplecFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/compressible/rhoSimpleFoam/Allwmake b/applications/solvers/compressible/rhoSimpleFoam/Allwmake
deleted file mode 100755
index dc0fd648f5ec8c8581720dce6c1a74643d256faf..0000000000000000000000000000000000000000
--- a/applications/solvers/compressible/rhoSimpleFoam/Allwmake
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake rhoPorousSimpleFoam
-wmake rhoSimplecFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/compressible/sonicFoam/Allwmake b/applications/solvers/compressible/sonicFoam/Allwmake
deleted file mode 100755
index 27c1194eaf6d808901fdc6412a81b6bb18d73145..0000000000000000000000000000000000000000
--- a/applications/solvers/compressible/sonicFoam/Allwmake
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake sonicDyMFoam
-wmake sonicLiquidFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean b/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean
deleted file mode 100755
index c583a8de0a566e26aac9c9ea863e7d07c49d3536..0000000000000000000000000000000000000000
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wclean
-wclean chtMultiRegionSimpleFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake b/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
deleted file mode 100755
index f65ba1181b27328e733c732a1defa724bce87f30..0000000000000000000000000000000000000000
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake chtMultiRegionSimpleFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/incompressible/pimpleFoam/Allwmake b/applications/solvers/incompressible/pimpleFoam/Allwmake
deleted file mode 100755
index 8727bdb2defc0c6c0c05a15565efc48dd782bbce..0000000000000000000000000000000000000000
--- a/applications/solvers/incompressible/pimpleFoam/Allwmake
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake SRFPimpleFoam
-wmake pimpleDyMFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/incompressible/simpleFoam/Allwmake b/applications/solvers/incompressible/simpleFoam/Allwmake
deleted file mode 100755
index 801fd3b767bf1abcd414509438ee99f14456a324..0000000000000000000000000000000000000000
--- a/applications/solvers/incompressible/simpleFoam/Allwmake
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-
-wmake SRFSimpleFoam
-wmake porousSimpleFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/lagrangian/DPMFoam/Allwclean b/applications/solvers/lagrangian/DPMFoam/Allwclean
index 25d0b2955f150c37f4d21a8ca6718438597c6c0b..6d736b2373f46bf526fca58e8f5bac0aaabd9c05 100755
--- a/applications/solvers/lagrangian/DPMFoam/Allwclean
+++ b/applications/solvers/lagrangian/DPMFoam/Allwclean
@@ -3,6 +3,6 @@
 cd ${0%/*} || exit 1
 set -x
 
-wclean DPMTurbulenceModels
+wclean libso DPMTurbulenceModels
 wclean
 wclean MPPICFoam
diff --git a/applications/solvers/lagrangian/DPMFoam/Allwmake b/applications/solvers/lagrangian/DPMFoam/Allwmake
index 6308a7052b2714af8ca552f2a7a5450d048afcba..8a47fb1b346d1827ebbc9f268957895ed5738590 100755
--- a/applications/solvers/lagrangian/DPMFoam/Allwmake
+++ b/applications/solvers/lagrangian/DPMFoam/Allwmake
@@ -3,6 +3,6 @@
 cd ${0%/*} || exit 1
 set -x
 
-wmake DPMTurbulenceModels
+wmake libso DPMTurbulenceModels
 wmake
 wmake MPPICFoam
diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Allwmake b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Allwmake
deleted file mode 100755
index 845cebd7776d3b28dda876dbe1c495d534e205ad..0000000000000000000000000000000000000000
--- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Allwmake
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake icoUncoupledKinematicParcelDyMFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Allwmake b/applications/solvers/lagrangian/reactingParcelFoam/Allwmake
deleted file mode 100755
index f615df216c2c4087951cbcf947d83060f0ce8488..0000000000000000000000000000000000000000
--- a/applications/solvers/lagrangian/reactingParcelFoam/Allwmake
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake simpleReactingParcelFoam
-wmake LTSReactingParcelFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/lagrangian/sprayFoam/Allwmake b/applications/solvers/lagrangian/sprayFoam/Allwmake
deleted file mode 100755
index 542509db743c6f0549cccfcaacd404dd9fcadef1..0000000000000000000000000000000000000000
--- a/applications/solvers/lagrangian/sprayFoam/Allwmake
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-
-wmake sprayEngineFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/multiphase/cavitatingFoam/Allwclean b/applications/solvers/multiphase/cavitatingFoam/Allwclean
deleted file mode 100755
index 62548246e9a0fe529bef20fa7211ff2c396511e9..0000000000000000000000000000000000000000
--- a/applications/solvers/multiphase/cavitatingFoam/Allwclean
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wclean
-wclean cavitatingDyMFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/multiphase/cavitatingFoam/Allwmake b/applications/solvers/multiphase/cavitatingFoam/Allwmake
deleted file mode 100755
index 211c1978b2a1c17c5dd744e9ec105e3e28409140..0000000000000000000000000000000000000000
--- a/applications/solvers/multiphase/cavitatingFoam/Allwmake
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake cavitatingDyMFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwclean b/applications/solvers/multiphase/compressibleInterFoam/Allwclean
index aa0f3c01c6ba74c8d0cd77ee40e09214002110f6..9339e372a3773ee6be7dfd6dbdeb6cd08857e38b 100755
--- a/applications/solvers/multiphase/compressibleInterFoam/Allwclean
+++ b/applications/solvers/multiphase/compressibleInterFoam/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso twoPhaseMixtureThermo
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/multiphase/compressibleInterFoam/Allwmake
index a93da26cddb8cbeb7421c7bf086ef7ef86241fc4..835bf8346bbe94cf54383e8d7780ae80202b6287 100755
--- a/applications/solvers/multiphase/compressibleInterFoam/Allwmake
+++ b/applications/solvers/multiphase/compressibleInterFoam/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmake libso twoPhaseMixtureThermo
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean
index 8098c051604f5b67e75d5401178f2be68d974be1..7ccfc0d68fdaf3119d957c2ce13039ab96bc1ee0 100755
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso multiphaseMixtureThermo
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake
index dd002ee0698abdaffc004b7a81ee1b57fd996c2e..04e1ddbb1ff4bc84f3163133fc08bd8fb1d417a7 100755
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmake libso multiphaseMixtureThermo
diff --git a/applications/solvers/multiphase/driftFluxFoam/Allwclean b/applications/solvers/multiphase/driftFluxFoam/Allwclean
index 2af62458974d42d009b61c7e8ba6fcf1c7f70646..4bb3b9406d28b81c9f6aaa3670abad95200e94bf 100755
--- a/applications/solvers/multiphase/driftFluxFoam/Allwclean
+++ b/applications/solvers/multiphase/driftFluxFoam/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso mixtureViscosityModels
diff --git a/applications/solvers/multiphase/driftFluxFoam/Allwmake b/applications/solvers/multiphase/driftFluxFoam/Allwmake
index 764aef62dbcaefe61ba38377780416709d74d238..ac51afd1d11041ed4e0b55aee90388aa4801fd01 100755
--- a/applications/solvers/multiphase/driftFluxFoam/Allwmake
+++ b/applications/solvers/multiphase/driftFluxFoam/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmake libso mixtureViscosityModels
diff --git a/applications/solvers/multiphase/interFoam/Allwclean b/applications/solvers/multiphase/interFoam/Allwclean
deleted file mode 100755
index d91472696f7451ef849f1521c5966d3b9361716b..0000000000000000000000000000000000000000
--- a/applications/solvers/multiphase/interFoam/Allwclean
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wclean
-wclean interDyMFoam
-wclean porousInterFoam
-wclean LTSInterFoam
-wclean interMixingFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/multiphase/interFoam/Allwmake b/applications/solvers/multiphase/interFoam/Allwmake
deleted file mode 100755
index 035b007934439fef464b58712fe797044ff84dad..0000000000000000000000000000000000000000
--- a/applications/solvers/multiphase/interFoam/Allwmake
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake interDyMFoam
-wmake porousInterFoam
-wmake LTSInterFoam
-wmake interMixingFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean b/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean
index 99c52e59f92aa35bbe8ae7024a516b9b7b463d93..0e33252d5cee25b16a72edc6244f1e22cb51e0df 100755
--- a/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso phaseChangeTwoPhaseMixtures
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake
index 414ed904a0f5e3a0cba3726e142d3c87d7527968..9a2a5c2bab852bdaaa1f02388363356636c00991 100755
--- a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmake libso phaseChangeTwoPhaseMixtures
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean b/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean
index f9d9eaad2b45f0e842aee3c2be06f08897fb760f..a75382c13cbb676ff6a7af69e72b4139b0a4be47 100755
--- a/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso multiphaseSystem
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake
index bc9227ddcb52215d92da7c862480296a612ceee5..84a99b720011d6cf834da8d62873b38848dcfbb3 100755
--- a/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmakeLnInclude interfacialModels
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean
index 7edca3f5d1cf0b8a2fb9feb49388b1e8c120a973..02819df96f27c11b11af04a8154881689988489a 100755
--- a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean
+++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso multiphaseMixture
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
index 2a03ac9b6cbb89dc3f1c6c3b712166dfdfe41051..745347676b85b132c3e8436818e4c0fa4d9d99fa 100755
--- a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
+++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmake libso multiphaseMixture
diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Allwclean b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Allwclean
deleted file mode 100755
index f4a6354926ab866678b5800cfac410da4a089f03..0000000000000000000000000000000000000000
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Allwclean
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wclean
-wclean potentialFreeSurfaceDyMFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Allwmake b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Allwmake
deleted file mode 100755
index 38f7587aefa172635eb1bcc5b1552702002aafa2..0000000000000000000000000000000000000000
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Allwmake
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake
-wmake potentialFreeSurfaceDyMFoam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean
index 86633f630541ea221b83d1570cb3c98d9555161c..8103dc7201bc49c2cdb50d36f247de284fea3713 100755
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso twoPhaseSystem
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
index b01ec94acd8350438cb6e6a29aabb4718b2c9462..a4a7a60bd4ba1883b68d7ae76e4863ef00ae5e3e 100755
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmakeLnInclude interfacialModels
diff --git a/applications/test/fieldMapping/pipe1D/Allrun b/applications/test/fieldMapping/pipe1D/Allrun
index 575c24f73d6d1d0c23aae15f63e5544cb5942751..eb6e441abb1345143e6d4053d83f39fe69e0967e 100755
--- a/applications/test/fieldMapping/pipe1D/Allrun
+++ b/applications/test/fieldMapping/pipe1D/Allrun
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
diff --git a/applications/test/hexRef8/block/Allrun b/applications/test/hexRef8/block/Allrun
index 2fd3e2c4a764c53454c95eb3cd2fcde1daa338a6..541ce85b6d4918ddf5e90b4763a9078a54f073e5 100755
--- a/applications/test/hexRef8/block/Allrun
+++ b/applications/test/hexRef8/block/Allrun
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
diff --git a/applications/test/volField/cavity/Allrun b/applications/test/volField/cavity/Allrun
index 68be29709483bd1962422e1893756e2650b76d67..602fbc4f19a768e39eef79faee91c554c52cee77 100755
--- a/applications/test/volField/cavity/Allrun
+++ b/applications/test/volField/cavity/Allrun
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake
index 25800377a1cc0691573b3f8d6941c9ded767f9b2..bd253bbe9a19e6371402b45a4b9ab0810acf7b38 100755
--- a/applications/utilities/mesh/conversion/Optional/Allwmake
+++ b/applications/utilities/mesh/conversion/Optional/Allwmake
@@ -2,7 +2,7 @@
 #
 # Build optional components (eg, may depend on third-party libraries)
 # -----------------------------------------------------------------------------
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 # build libccmio and create lnInclude directory
diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake
index f9861db464db3868ba10dca683a22e022c92ecf0..ca171cb1cf4924cc023bd2c91a5a68cd5b914fba 100755
--- a/applications/utilities/mesh/generation/Allwmake
+++ b/applications/utilities/mesh/generation/Allwmake
@@ -1,17 +1,17 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
-wmake all blockMesh
-wmake all extrude
-wmake all extrude2DMesh
-wmake all snappyHexMesh
+wmake -all blockMesh
+wmake -all extrude
+wmake -all extrude2DMesh
+wmake -all snappyHexMesh
 
 if [ -n "$CGAL_ARCH_PATH" ]
 then
     wmake libso foamyHexMesh/conformalVoronoiMesh
-    wmake all foamyHexMesh
-    wmake all foamyQuadMesh
+    wmake -all foamyHexMesh
+    wmake -all foamyQuadMesh
 fi
 
 
diff --git a/applications/utilities/mesh/generation/extrude/Allwclean b/applications/utilities/mesh/generation/extrude/Allwclean
deleted file mode 100755
index 253b4b4d6d627bee970c961d953dbdcd6f6f965c..0000000000000000000000000000000000000000
--- a/applications/utilities/mesh/generation/extrude/Allwclean
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wclean extrudeMesh
-wclean extrudeToRegionMesh
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/mesh/generation/extrude/Allwmake b/applications/utilities/mesh/generation/extrude/Allwmake
deleted file mode 100755
index 3fd3d2314a976adae9d45588d9fcd25d845f8032..0000000000000000000000000000000000000000
--- a/applications/utilities/mesh/generation/extrude/Allwmake
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-set -x
-
-wmake extrudeMesh
-wmake extrudeToRegionMesh
-
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/Allwclean b/applications/utilities/mesh/generation/extrude2DMesh/Allwclean
index 44537ed68bad409595e8570f7fa983e0753c6928..1f7114a1114796bf83f0271e5bcf53f7cdf349ec 100755
--- a/applications/utilities/mesh/generation/extrude2DMesh/Allwclean
+++ b/applications/utilities/mesh/generation/extrude2DMesh/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso extrude2DMesh
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/Allwmake b/applications/utilities/mesh/generation/extrude2DMesh/Allwmake
index 6f54612ffe710adcc912c9baed4eb8a97cae1f91..a56b144e293d36f67f6f5f85dbdd746fa9239d66 100755
--- a/applications/utilities/mesh/generation/extrude2DMesh/Allwmake
+++ b/applications/utilities/mesh/generation/extrude2DMesh/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmake libso extrude2DMesh
diff --git a/applications/utilities/mesh/generation/foamyHexMesh/Allwclean b/applications/utilities/mesh/generation/foamyHexMesh/Allwclean
index 696f6c0b65042a077e854ffbac8b8764bfdc3ee2..0fc43eacc3d8551fb6ab9c465f7f53e1ffe568f8 100755
--- a/applications/utilities/mesh/generation/foamyHexMesh/Allwclean
+++ b/applications/utilities/mesh/generation/foamyHexMesh/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso conformalVoronoiMesh
diff --git a/applications/utilities/mesh/generation/foamyHexMesh/Allwmake b/applications/utilities/mesh/generation/foamyHexMesh/Allwmake
index 67770e51c5a77dcd0a723af612ac1b802e511898..419947964ab2ce9f5f9fec3ae346405bcd7153e2 100755
--- a/applications/utilities/mesh/generation/foamyHexMesh/Allwmake
+++ b/applications/utilities/mesh/generation/foamyHexMesh/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 if [ -n "$CGAL_ARCH_PATH" ]
diff --git a/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMeshSurfaceSimplify/Allwmake b/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMeshSurfaceSimplify/Allwmake
index 98dec66c76bfc035c39136cff18ad685c707128c..8d3e3840ef959988eb63f600cdf425f56e57e4f0 100755
--- a/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMeshSurfaceSimplify/Allwmake
+++ b/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMeshSurfaceSimplify/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 if [ -d "${FASTDUALOCTREE_SRC_PATH}" ]
diff --git a/applications/utilities/mesh/generation/foamyQuadMesh/Allwclean b/applications/utilities/mesh/generation/foamyQuadMesh/Allwclean
index d0ae53e41503d0ccd189b47c40f83dc193030e03..b147a002b554975c71daba3af5d0b020e0ec0d27 100755
--- a/applications/utilities/mesh/generation/foamyQuadMesh/Allwclean
+++ b/applications/utilities/mesh/generation/foamyQuadMesh/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso conformalVoronoi2DMesh
diff --git a/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake b/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake
index 242939465f44b5e01c6bcf979c575af95b0efc55..da5007ab8fa91cb44d23915b45635394833380fe 100755
--- a/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake
+++ b/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 if [ -n "$CGAL_ARCH_PATH" ]
diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
index 250914574fa918a7f6047e9fe3f43877340e2c45..64641c22fd22ca806b0e6f3ea3130255e3fc2526 100755
--- a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
+++ b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 export COMPILE_FLAGS=''
 export LINK_FLAGS=''
@@ -10,7 +10,7 @@ then
     export LINK_FLAGS="${LINK_FLAGS} -lSloanRenumber"
 fi
 
-if [ "${ZOLTAN_ARCH_PATH}/lib/libzoltan.a" -a -f "${FOAM_LIBBIN}/libzoltanRenumber.so" ]
+if [ -f "${ZOLTAN_ARCH_PATH}/lib/libzoltan.a" -a -f "${FOAM_LIBBIN}/libzoltanRenumber.so" ]
 then
     echo "Found libzoltanRenumber.so  --  enabling zoltan renumbering support."
     export COMPILE_FLAGS="-DFOAM_USE_ZOLTAN"
diff --git a/applications/utilities/mesh/manipulation/setSet/Allwmake b/applications/utilities/mesh/manipulation/setSet/Allwmake
index 0d586b6f941c70fff4d732d7132139b37d12c095..c651ba841fb473c8c15724a41dccb46eb92aac1a 100755
--- a/applications/utilities/mesh/manipulation/setSet/Allwmake
+++ b/applications/utilities/mesh/manipulation/setSet/Allwmake
@@ -1,16 +1,12 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 unset COMP_FLAGS LINK_FLAGS
 
 #
 # use readline if available
-# unless otherwise specified (with NO_READLINE)
 #
-# eg,  ./Allwmake NO_READLINE
-#
-
-if [ -f /usr/include/readline/readline.h -a "${1%NO_READLINE}" = "$1" ]
+if [ -f /usr/include/readline/readline.h ]
 then
     echo "Found <readline/readline.h>  --  enabling readline support."
     export COMP_FLAGS="-DHAS_READLINE"
diff --git a/applications/utilities/miscellaneous/foamHelp/Allwclean b/applications/utilities/miscellaneous/foamHelp/Allwclean
index 9dca480e2ec1907c6f27fb2e9b1eac70843a4b38..01d5bfd9f352b783d57e3eb023fe8b14593c2e7b 100755
--- a/applications/utilities/miscellaneous/foamHelp/Allwclean
+++ b/applications/utilities/miscellaneous/foamHelp/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 wclean libso helpTypes
 wclean
diff --git a/applications/utilities/miscellaneous/foamHelp/Allwmake b/applications/utilities/miscellaneous/foamHelp/Allwmake
index 4724935b92aafcaca83af530da8936424d25461c..2c999bf34b4da2f7ae181e4264e15792fe5cf527 100755
--- a/applications/utilities/miscellaneous/foamHelp/Allwmake
+++ b/applications/utilities/miscellaneous/foamHelp/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 wmake libso helpTypes
 wmake
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
index 99e4ccb477af73b24f6a0a10ed3e7e9affb221bc..8ef9158c5de7629a9990b38054a0caa649843f9f 100755
--- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
+++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 if [ ! -d ${WM_THIRD_PARTY_DIR}/tecio ]
 then
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwclean b/applications/utilities/postProcessing/graphics/PV3Readers/Allwclean
index b867e563ff448d8f11fcd274244b85841c080507..ca689294d1512a7befff159081394e31e0c26c68 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso vtkPV3Readers
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
index 3bddd64d800af14f35115ec3c5f19d225faf926c..ae0915f2680fef5cceb7b00b604b2296bd5d9374 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 #set -x
 
 case "$ParaView_VERSION" in
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean
index c5f41ab9da11f3dc5f09f81ef6cf6d58a5e67d09..6d052fb73d666c674e966af1e7457cb261e6071f 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 # deal with client/server vs combined plugins
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
index c99e05fd6be14fb45af8138eefa13ecb7a370997..93ce993d655c2bb5df9b087391b3d70f7547265c 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean
index d2c85df001142d7a9c09d855fc3df2acea6dcaba..4ce9a2a07ff01c6e50961fe3474a91c723e5454f 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 # deal with client/server vs combined plugins
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
index 4f055b3c0fb2b19dc3dfb25d8ee25536614a51bf..09e76eac497dd4d6e3c461defd6ab46dfbe6cf7b 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/Allwclean b/applications/utilities/postProcessing/graphics/PV4Readers/Allwclean
index f1171eb61e617481ecdce36c381a1cc462515741..524a715f448c97d86dda672c834427fd6232e46e 100755
--- a/applications/utilities/postProcessing/graphics/PV4Readers/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wclean libso vtkPV4Readers
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
index aa102b5e6a9012138b965ab972756335c18f83c3..6f6e56b9d8d1aae68567258138c6b946639144f6 100755
--- a/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 #set -x
 
 case "$ParaView_VERSION" in
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean
index 39520be1ab678cf5d03b92b32b04c56da14a1b00..b6ef33f8637a9402b9ad3dc5e6e3059decf6250b 100755
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 # deal with client/server vs combined plugins
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake
index dd88afc02982fba7df08e342beafa8a3a724073f..0728cf9f6acb2e5d1064a8ed2e77333db741a005 100755
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
index 92494c4f6b9eef4373bcdca261530d9798a63cb7..4c2d5158b789ac6aebabaa03413ce47a445c38c1 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
@@ -72,6 +72,7 @@ ENDIF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
 
 TARGET_LINK_LIBRARIES(
     PV4FoamReader_SM
+    LINK_PUBLIC
     OpenFOAM
     finiteVolume
     vtkPV4Foam
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean
index 9e3e5a3afae4cdc465534ad9e0676a2815ce5713..f735dbbe529bd301bdbc9749c6a41d762ed1c0c6 100755
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 # deal with client/server vs combined plugins
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake
index 645a9177246ba650dd6cedf255899da4e82e30d0..a13503094cee6c0c01938dd704003428ca650114 100755
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
index 9ed8871208d165ef18b5a861580af9700d2f235f..72003c881543701899f29334a303f0311eedff68 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
@@ -73,6 +73,7 @@ ENDIF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
 
 TARGET_LINK_LIBRARIES(
     PV4blockMeshReader_SM
+    LINK_PUBLIC
     OpenFOAM
     blockMesh
     vtkPV4blockMesh
diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
index f29cdda208386794ff1b67d4e6e8de52e0298877..e033316861cc9150d617487cadbafbde94f68fa9 100755
--- a/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 wmake libso
 
diff --git a/applications/utilities/preProcessing/wallFunctionTable/Allwmake b/applications/utilities/preProcessing/wallFunctionTable/Allwmake
index 55a6cbd37fa9dcbaf7e2eb1f32402e0d74f79d11..c527fdf38fc6ee6b5ef0eb9353412d2e11998c94 100755
--- a/applications/utilities/preProcessing/wallFunctionTable/Allwmake
+++ b/applications/utilities/preProcessing/wallFunctionTable/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmake libso tabulatedWallFunction
diff --git a/doc/Allwmake b/doc/Allwmake
index 5d8ed9c5a04598902c6b89aecd1f5981e8e29387..76b8eee2ce6ccb29213077cafe3cf8a53f81d16c 100755
--- a/doc/Allwmake
+++ b/doc/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 # fix permissions (NB: '+X' and not '+x'!)
diff --git a/doc/Doxygen/Allwmake b/doc/Doxygen/Allwmake
index fbc20d93fd054d2fa63b80606e6f0e36924c027e..a349ee4fc1761041bcdc140d29f39cf1a269dcf8 100755
--- a/doc/Doxygen/Allwmake
+++ b/doc/Doxygen/Allwmake
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 [ -d "$WM_PROJECT_DIR" ] || {
     echo "Error: WM_PROJECT_DIR directory does not exist"
diff --git a/src/Allwmake b/src/Allwmake
index fa091ed845c2749db93b22af1527bea6c0ee2d47..925b3f211ec7b3dcbc1b1ee91935f25bad2a9fd1 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -1,86 +1,83 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
 wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
-    echo "Error: Current directory is not \$WM_PROJECT_DIR/src"
+    echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/src"
     echo "    The environment variables are inconsistent with the installation."
     echo "    Check the OpenFOAM entries in your dot-files and source them."
     exit 1
 }
 
 [ -n "$FOAM_EXT_LIBBIN" ] || {
-    echo "Error: FOAM_EXT_LIBBIN not set"
+    echo "Allwmake error: FOAM_EXT_LIBBIN not set"
     echo "    Check the OpenFOAM entries in your dot-files and source them."
     exit 1
 }
 
 set -x
 
-# update OpenFOAM version strings if required
+# Update OpenFOAM version strings if required
 wmakePrintBuild -check || /bin/rm -f OpenFOAM/Make/*/global.? 2>/dev/null
 
 wmakeLnInclude OpenFOAM
 wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX}
-Pstream/Allwmake $*
+Pstream/Allwmake $targetType $*
 
 OSspecific/${WM_OSTYPE:-POSIX}/Allwmake $*
-wmake $makeType OpenFOAM
+wmake $targetType OpenFOAM
 
-wmake $makeType fileFormats
-wmake $makeType surfMesh
-wmake $makeType triSurface
-wmake $makeType meshTools
-wmake $makeType edgeMesh
+wmake $targetType fileFormats
+wmake $targetType surfMesh
+wmake $targetType triSurface
+wmake $targetType meshTools
+wmake $targetType edgeMesh
 
 # Decomposition methods needed by dummyThirdParty
+# (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
 parallel/decompose/AllwmakeLnInclude
-# dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
-dummyThirdParty/Allwmake $*
-
-wmake $makeType finiteVolume
-wmake $makeType lagrangian/basic
-wmake $makeType lagrangian/distributionModels
-wmake $makeType genericPatchFields
-
-# Build the proper scotchDecomp, metisDecomp etc.
-parallel/Allwmake $*
-
-renumber/Allwmake $*
-
-wmake $makeType conversion
-
-wmake $makeType sampling
-
-wmake $makeType mesh/extrudeModel
-
-wmake $makeType dynamicMesh
-wmake $makeType dynamicFvMesh
-wmake $makeType topoChangerFvMesh
-
-wmake $makeType ODE
-wmake $makeType randomProcesses
-
-thermophysicalModels/Allwmake $*
-transportModels/Allwmake $*
-turbulenceModels/Allwmake $*
-TurbulenceModels/Allwmake $*
-wmake $makeType combustionModels
-regionModels/Allwmake $*
-lagrangian/Allwmake $*
-mesh/Allwmake $*
-
-fvAgglomerationMethods/Allwmake $*
-
-wmake $makeType fvMotionSolver
-wmake $makeType engine
-
-wmake $makeType fvOptions
-
-wmake $makeType regionCoupled
-
-postProcessing/Allwmake $*
+dummyThirdParty/Allwmake $targetType $*
+
+wmake $targetType finiteVolume
+wmake $targetType lagrangian/basic
+wmake $targetType lagrangian/distributionModels
+wmake $targetType genericPatchFields
+
+wmake $targetType conversion
+wmake $targetType sampling
+wmake $targetType mesh/extrudeModel
+wmake $targetType dynamicMesh
+wmake $targetType dynamicFvMesh
+wmake $targetType topoChangerFvMesh
+
+# Compile scotchDecomp, metisDecomp etc.
+parallel/Allwmake $targetType $*
+
+wmake $targetType ODE
+wmake $targetType randomProcesses
+
+transportModels/Allwmake $targetType $*
+thermophysicalModels/Allwmake $targetType $*
+turbulenceModels/Allwmake $targetType $*
+TurbulenceModels/Allwmake $targetType $*
+wmake $targetType combustionModels
+regionModels/Allwmake $targetType $*
+lagrangian/Allwmake $targetType $*
+mesh/Allwmake $targetType $*
+renumber/Allwmake $targetType $*
+fvAgglomerationMethods/Allwmake $targetType $*
+
+wmake $targetType fvMotionSolver
+wmake $targetType engine
+wmake $targetType fvOptions
+wmake $targetType regionCoupled
+
+postProcessing/Allwmake $targetType $*
+
+wmake $targetType sixDoFRigidBodyMotion
 
-wmake $makeType sixDoFRigidBodyMotion
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/OSspecific/POSIX/Allwmake b/src/OSspecific/POSIX/Allwmake
index 52a54646f06c808c4b53f2d955aa820cac45b81a..6cb776136efe51830771754ff96ecc30c5a4dbe7 100755
--- a/src/OSspecific/POSIX/Allwmake
+++ b/src/OSspecific/POSIX/Allwmake
@@ -1,16 +1,16 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libo}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libo
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments $*
 
 unset COMP_FLAGS LINK_FLAGS
 
 #
 # use <sys/inotify.h> if available (Linux)
-# unless otherwise specified (with USE_STAT)
-#
-# eg,  ./Allwmake USE_STAT
 #
-if [ -f /usr/include/sys/inotify.h -a "${1%USE_STAT}" = "$1" ]
+if [ -f /usr/include/sys/inotify.h ]
 then
     echo "Found <sys/inotify.h>  --  enabling inotify for file monitoring."
     export COMP_FLAGS="-DFOAM_USE_INOTIFY"
@@ -18,8 +18,7 @@ else
     unset COMP_FLAGS
 fi
 
-
-# make (non-shared) object
-wmake $makeType 
+# make (non-shared by default) object
+wmake $targetType
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake
index 50ccb5fe1d1e175dc705a861cf7fa7454c33839d..0c490c57502c73e7a63e5bf80e7e820738b4a81a 100755
--- a/src/Pstream/Allwmake
+++ b/src/Pstream/Allwmake
@@ -1,10 +1,13 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
 
 #
-# define how to create an mpi-versioned library of $makeType
+# define how to create an mpi-versioned library of $targetType
 # compile into qualified directory
 # use sentinel file to handle version changes
 #
@@ -15,10 +18,10 @@ wmakeMpiLib()
     do
     (
         WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
-        whichmpi="$libName/Make/$WM_OPTIONS/using:$FOAM_MPI"
+        whichmpi="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/Pstream/$libName/using:$FOAM_MPI"
         [ -e "$whichmpi" ] || wclean $libName
-        echo "wmake $makeType $libName"
-        wmake $makeType $libName
+        echo "wmake $targetType $libName"
+        wmake $targetType $libName
         touch "$whichmpi"
     )
     done
@@ -26,7 +29,7 @@ wmakeMpiLib()
 }
 
 set -x
-wmake $makeType dummy
+wmake $targetType dummy
 
 case "$WM_MPLIB" in
 *MPI*)
@@ -36,10 +39,6 @@ case "$WM_MPLIB" in
     echo
     wmakeMpiLib mpi
     ;;
-
-#GAMMA)
-#    wmake $makeType gamma
-#    ;;
 esac
 
 
diff --git a/src/TurbulenceModels/Allwmake b/src/TurbulenceModels/Allwmake
index 84deb51c932692c3d145f89a2a89760fd29f2f7a..fb0c219f581dc540c6c38916047fa430fcd2c89a 100755
--- a/src/TurbulenceModels/Allwmake
+++ b/src/TurbulenceModels/Allwmake
@@ -1,11 +1,14 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType turbulenceModels
-wmake $makeType incompressible
-wmake $makeType compressible
+wmake $targetType turbulenceModels
+wmake $targetType incompressible
+wmake $targetType compressible
 wmakeLnInclude phaseIncompressible
 wmakeLnInclude phaseCompressible
 
diff --git a/src/conversion/Allwmake b/src/conversion/Allwmake
index 014885de4792becd0a6dff09304e0c5e6cc63d9f..125d78c5e4704d9acebee897da850feeeee0c1d8 100755
--- a/src/conversion/Allwmake
+++ b/src/conversion/Allwmake
@@ -1,8 +1,11 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType
+wmake $targetType
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/dummyThirdParty/Allwmake b/src/dummyThirdParty/Allwmake
index d747a472dbb6aefa4544614087ab8712e5d9df96..a819e774940ea09c9cc94abea2d2cfa900c31f55 100755
--- a/src/dummyThirdParty/Allwmake
+++ b/src/dummyThirdParty/Allwmake
@@ -1,12 +1,15 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType scotchDecomp
-wmake $makeType ptscotchDecomp
-wmake $makeType metisDecomp
-wmake $makeType MGridGen
+wmake $targetType scotchDecomp
+wmake $targetType ptscotchDecomp
+wmake $targetType metisDecomp
+wmake $targetType MGridGen
 
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/fvAgglomerationMethods/Allwmake b/src/fvAgglomerationMethods/Allwmake
index 4fc3ed6029541a50fe93dd1e917281a254f80ed8..f03db10d3f94140a66d35e3c3dd3e705d4687a90 100755
--- a/src/fvAgglomerationMethods/Allwmake
+++ b/src/fvAgglomerationMethods/Allwmake
@@ -1,33 +1,36 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 export ParMGridGen=$WM_THIRD_PARTY_DIR/ParMGridGen-1.0
 
 if [ -e "$FOAM_LIBBIN/libMGridGen.so" ]
 then
-    wmake $makeType MGridGenGamgAgglomeration
+    wmake $targetType MGridGenGamgAgglomeration
 fi
 
-wmake $makeType pairPatchAgglomeration
+wmake $targetType pairPatchAgglomeration
 
 
 ## get SCOTCH_VERSION, SCOTCH_ARCH_PATH
-#if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
-#then
-#    . $settings
-#    echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
-#else
-#    echo
-#    echo "Error: no config/scotch.sh settings"
-#    echo
-#fi
-#
-#if [ -n "$SCOTCH_ARCH_PATH" ]
-#then
-#    wmake $makeType scotchGamgAgglomeration
-#fi
+if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
+then
+    . $settings
+    echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
+else
+    echo
+    echo "Error: no config/scotch.sh settings"
+    echo
+fi
+
+if [ -n "$SCOTCH_ARCH_PATH" ]
+then
+    wmake $targetType scotchGamgAgglomeration
+fi
 
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake
index 104d37234d9acc2ff5c2909b8aa75ec1bf2b4b1e..1f00dde890ba7331a47146d71578cb32fcdd2cf3 100755
--- a/src/lagrangian/Allwmake
+++ b/src/lagrangian/Allwmake
@@ -1,18 +1,21 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType distributionModels
-wmake $makeType basic
-wmake $makeType solidParticle
-wmake $makeType intermediate
-wmake $makeType turbulence
-wmake $makeType Turbulence
-wmake $makeType spray
-wmake $makeType dsmc
-wmake $makeType coalCombustion
+wmake $targetType distributionModels
+wmake $targetType basic
+wmake $targetType solidParticle
+wmake $targetType intermediate
+wmake $targetType turbulence
+wmake $targetType Turbulence
+wmake $targetType spray
+wmake $targetType dsmc
+wmake $targetType coalCombustion
 
-molecularDynamics/Allwmake $*
+molecularDynamics/Allwmake $targetType $*
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/lagrangian/molecularDynamics/Allwmake b/src/lagrangian/molecularDynamics/Allwmake
index 7c17819ad52c64d6e5d97b480f8571f3a32785b2..2020afcadc4c5e74278d1465fee2dc68d84bbced 100755
--- a/src/lagrangian/molecularDynamics/Allwmake
+++ b/src/lagrangian/molecularDynamics/Allwmake
@@ -1,10 +1,13 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType potential
-wmake $makeType molecularMeasurements
-wmake $makeType molecule
+wmake $targetType potential
+wmake $targetType molecularMeasurements
+wmake $targetType molecule
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/mesh/Allwmake b/src/mesh/Allwmake
index 4653b1d3c4db8c78ca7b8af79e1399ae423d30fa..fef9e5c2bc6f092fd03665ef867a31fa6ff21a0a 100755
--- a/src/mesh/Allwmake
+++ b/src/mesh/Allwmake
@@ -1,10 +1,13 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType autoMesh
-wmake $makeType blockMesh
-wmake $makeType extrudeModel
+wmake $targetType autoMesh
+wmake $targetType blockMesh
+wmake $targetType extrudeModel
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/parallel/Allwmake b/src/parallel/Allwmake
index ab84e5b749c2e6815e579e194f910a9fc2dac13c..97d62f0612ed8c119939c0d24b344ca9c0d5fdeb 100755
--- a/src/parallel/Allwmake
+++ b/src/parallel/Allwmake
@@ -1,11 +1,14 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-decompose/Allwmake $*
-reconstruct/Allwmake $*
-wmake $makeType distributed
+decompose/Allwmake $targetType $*
+reconstruct/Allwmake $targetType $*
+wmake $targetType distributed
 
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake
index e6d0a1dee57c5d23a6ad4409ecf844147e728f3a..3aceabafd8dc0e65caf98c16145a7b8a51295c9b 100755
--- a/src/parallel/decompose/Allwmake
+++ b/src/parallel/decompose/Allwmake
@@ -1,6 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
 # get SCOTCH_VERSION, SCOTCH_ARCH_PATH
 if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
@@ -15,7 +18,7 @@ fi
 
 
 #
-# define how to create an mpi-versioned library of $makeType
+# define how to create an mpi-versioned library of $targetType
 # compile into qualified directory
 # use sentinel file to handle version changes
 #
@@ -26,11 +29,11 @@ wmakeMpiLib()
     do
     (
         WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
-        whichmpi="$libName/Make/$WM_OPTIONS/using:$FOAM_MPI"
-        whichscotch="$libName/Make/$WM_OPTIONS/using:$SCOTCH_VERSION"
+        whichmpi="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$FOAM_MPI"
+        whichscotch="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$SCOTCH_VERSION"
         [ -e "$whichmpi" -a -e "$whichscotch" ] || wclean $libName
-        echo "wmake $makeType $libName"
-        wmake $makeType $libName
+        echo "wmake $targetType $libName"
+        wmake $targetType $libName
         touch "$whichmpi" "$whichscotch"
     )
     done
@@ -43,16 +46,18 @@ wmakeLnInclude decompositionMethods
 
 if [ -n "$SCOTCH_ARCH_PATH" ]
 then
-    wmake $makeType scotchDecomp
+    wmake $targetType scotchDecomp
 
     if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
     then
         #- Bit of a hack: ptscotch 6 requires scotch linked as well as. Can be
         #  removed once ptscotch declares dependency on scotch itself.
-        if [ "$SCOTCH_VERSION" = "scotch_6.0.0" ]
-        then
+        case "$SCOTCH_VERSION" in
+        scotch_6.*)
             export LINK_FLAGS="-lscotch"
-        fi
+            ;;
+        esac
+
 
         wmakeMpiLib ptscotchDecomp
     fi
@@ -64,11 +69,11 @@ fi
 
 
 # Try and build metisDecomp (has own logic)
-(cd metisDecomp && ./Allwmake $makeType)
+(cd metisDecomp && ./Allwmake $targetType)
 
 
-wmake $makeType decompositionMethods
+wmake $targetType decompositionMethods
 
-wmake $makeType decompose
+wmake $targetType decompose
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/parallel/decompose/AllwmakeLnInclude b/src/parallel/decompose/AllwmakeLnInclude
index c6a537aa42e516cf21f6316e6669a1439b6f2015..b2ee544686d780cd9b5b92423f9f3f2073e369e1 100755
--- a/src/parallel/decompose/AllwmakeLnInclude
+++ b/src/parallel/decompose/AllwmakeLnInclude
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 set -x
 
 wmakeLnInclude decompositionMethods
diff --git a/src/parallel/decompose/metisDecomp/Allwmake b/src/parallel/decompose/metisDecomp/Allwmake
index a97d63a93baf931ca052b815a75b22f6f8fac6b2..549e4229b8a5d15b8f153a3114e8f4229bad9e22 100755
--- a/src/parallel/decompose/metisDecomp/Allwmake
+++ b/src/parallel/decompose/metisDecomp/Allwmake
@@ -1,6 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
 # get METIS_VERSION, METIS_ARCH_PATH
 if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/metis.sh`
@@ -9,7 +12,7 @@ then
     echo "using METIS_ARCH_PATH=$METIS_ARCH_PATH"
     if [ -r $METIS_ARCH_PATH/lib/libmetis.so ]
     then
-        wmake $makeType
+        wmake $targetType
     fi
 else
     echo
diff --git a/src/parallel/reconstruct/Allwmake b/src/parallel/reconstruct/Allwmake
index 85e8e9723a63aa6e8a724b689b3e22fe383bc8b8..4774eed05288319bd9565fd02c3526a284dd5606 100755
--- a/src/parallel/reconstruct/Allwmake
+++ b/src/parallel/reconstruct/Allwmake
@@ -1,8 +1,11 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType reconstruct
+wmake $targetType reconstruct
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake
index 3522721c4d31912e879e581448c9575d06d97a1b..92daaa49f39b3dda3b4b520dad17709b37a693f3 100755
--- a/src/postProcessing/Allwmake
+++ b/src/postProcessing/Allwmake
@@ -1,11 +1,14 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 wmake ${1:-libo} postCalc
-wmake $makeType foamCalcFunctions
+wmake $targetType foamCalcFunctions
 
-functionObjects/Allwmake $*
+functionObjects/Allwmake $targetType $*
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/postProcessing/functionObjects/Allwmake b/src/postProcessing/functionObjects/Allwmake
index 178a1a3cfeac39360210abf8d266135354a5a479..535b8281c48bdc33efba45a566e8af91e590490f 100755
--- a/src/postProcessing/functionObjects/Allwmake
+++ b/src/postProcessing/functionObjects/Allwmake
@@ -1,15 +1,18 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType cloud
-wmake $makeType field
-wmake $makeType forces
-wmake $makeType fvTools
-wmake $makeType IO
-wmake $makeType jobControl
-wmake $makeType systemCall
-wmake $makeType utilities
+wmake $targetType cloud
+wmake $targetType field
+wmake $targetType forces
+wmake $targetType fvTools
+wmake $targetType IO
+wmake $targetType jobControl
+wmake $targetType systemCall
+wmake $targetType utilities
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/regionModels/Allwclean b/src/regionModels/Allwclean
index f95d816a531fc1f4a94727559b5cf7303cee193f..8297b201c052b19a9ac0a002a3553caf1530557e 100755
--- a/src/regionModels/Allwclean
+++ b/src/regionModels/Allwclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 makeType=${1:-libso}
 set -x
 
diff --git a/src/regionModels/Allwmake b/src/regionModels/Allwmake
index 669b701e81dff16a9623b406501de36dbee8fd25..877c4b00c5755d4df7e3d7d70ef3616f6469d364 100755
--- a/src/regionModels/Allwmake
+++ b/src/regionModels/Allwmake
@@ -1,14 +1,17 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType regionModel
-wmake $makeType pyrolysisModels
-wmake $makeType surfaceFilmModels
-wmake $makeType surfaceFilmModels/derivedFvPatchFields/wallFunctions
-wmake $makeType thermalBaffleModels
-wmake $makeType regionCoupling
+wmake $targetType regionModel
+wmake $targetType pyrolysisModels
+wmake $targetType surfaceFilmModels
+wmake $targetType surfaceFilmModels/derivedFvPatchFields/wallFunctions
+wmake $targetType thermalBaffleModels
+wmake $targetType regionCoupling
 
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/renumber/Allwmake b/src/renumber/Allwmake
index d7f72d93beb18de5c680b2e5d286a4bdda4a2a64..ec1acb8320d4527265b0bd40c44d46b68558ec43 100755
--- a/src/renumber/Allwmake
+++ b/src/renumber/Allwmake
@@ -1,6 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
 ## get ZOLTAN_ARCH_PATH
 #if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/zoltan.sh`
@@ -16,11 +19,11 @@ makeType=${1:-libso}
 
 set -x
 
-wmake $makeType renumberMethods
+wmake $targetType renumberMethods
 
 if [ -n "$BOOST_ARCH_PATH" ]
 then
-    wmake $makeType SloanRenumber
+    wmake $targetType SloanRenumber
 else
     echo
     echo "Skipping SloanRenumber"
@@ -30,7 +33,7 @@ fi
 
 if [ -n "$ZOLTAN_ARCH_PATH" ]
 then
-    wmake $makeType zoltanRenumber
+    wmake $targetType zoltanRenumber
 else
     echo
     echo "Skipping zoltanRenumber"
diff --git a/src/thermophysicalModels/Allwmake b/src/thermophysicalModels/Allwmake
index dbd8310a3bcfb9b075311a019f669304d88eb042..2234d5c9aa978fff99de84a315d363dc32dad5ba 100755
--- a/src/thermophysicalModels/Allwmake
+++ b/src/thermophysicalModels/Allwmake
@@ -1,24 +1,27 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType specie
-wmake $makeType solidSpecie
-wmake $makeType thermophysicalFunctions
-./properties/Allwmake $*
+wmake $targetType specie
+wmake $targetType solidSpecie
+wmake $targetType thermophysicalFunctions
+./properties/Allwmake $targetType $*
 
-wmake $makeType basic
-wmake $makeType reactionThermo
-wmake $makeType laminarFlameSpeed
-wmake $makeType chemistryModel
-wmake $makeType barotropicCompressibilityModel
-wmake $makeType SLGThermo
+wmake $targetType basic
+wmake $targetType reactionThermo
+wmake $targetType laminarFlameSpeed
+wmake $targetType chemistryModel
+wmake $targetType barotropicCompressibilityModel
+wmake $targetType SLGThermo
 
 
-wmake $makeType solidThermo
-wmake $makeType solidChemistryModel
+wmake $targetType solidThermo
+wmake $targetType solidChemistryModel
 
-wmake $makeType radiationModels
+wmake $targetType radiationModels
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/thermophysicalModels/properties/Allwmake b/src/thermophysicalModels/properties/Allwmake
index f088d140d5f141f6cc63039f672fcadd1930f44b..6ee093bc11a25dbddd315f1096567c96da302d21 100755
--- a/src/thermophysicalModels/properties/Allwmake
+++ b/src/thermophysicalModels/properties/Allwmake
@@ -1,12 +1,15 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType liquidProperties
-wmake $makeType liquidMixtureProperties
-wmake $makeType solidProperties
-wmake $makeType solidMixtureProperties
+wmake $targetType liquidProperties
+wmake $targetType liquidMixtureProperties
+wmake $targetType solidProperties
+wmake $targetType solidMixtureProperties
 
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/thermophysicalModels/reactionThermo/Make/files b/src/thermophysicalModels/reactionThermo/Make/files
index e4e8c49e2b6c1411a4badc7e8045c7c50cb1f976..879c82bad67d6ca2a04012efe8875c9c23dc6c4a 100644
--- a/src/thermophysicalModels/reactionThermo/Make/files
+++ b/src/thermophysicalModels/reactionThermo/Make/files
@@ -1,5 +1,5 @@
 chemistryReaders/chemkinReader/chemkinReader.C
-chemistryReaders/chemkinReader/chemkinLexer.C
+chemistryReaders/chemkinReader/chemkinLexer.L
 chemistryReaders/chemistryReader/makeChemistryReaders.C
 
 mixtures/basicMultiComponentMixture/basicMultiComponentMixture.C
diff --git a/src/transportModels/Allwmake b/src/transportModels/Allwmake
index 07272706a690bf1f4a5fa6e02d9ce8db01a01b6f..1d9598d43657ed71c4e70cc3e435c0168ed52a34 100755
--- a/src/transportModels/Allwmake
+++ b/src/transportModels/Allwmake
@@ -1,13 +1,16 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType twoPhaseMixture
-wmake $makeType interfaceProperties
-wmake $makeType twoPhaseProperties
-wmake $makeType incompressible
-wmake $makeType compressible
-wmake $makeType immiscibleIncompressibleTwoPhaseMixture
+wmake $targetType twoPhaseMixture
+wmake $targetType interfaceProperties
+wmake $targetType twoPhaseProperties
+wmake $targetType incompressible
+wmake $targetType compressible
+wmake $targetType immiscibleIncompressibleTwoPhaseMixture
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/turbulenceModels/Allwmake b/src/turbulenceModels/Allwmake
index 3cba27ed1c33ad4b2b34da04bfed9642a72168f1..3a95797baf906b3e9607fd86b93ac11cd01ccc74 100755
--- a/src/turbulenceModels/Allwmake
+++ b/src/turbulenceModels/Allwmake
@@ -1,11 +1,14 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-LES/Allwmake $*
-incompressible/Allwmake $*
-compressible/Allwmake $*
-wmake $makeType derivedFvPatchFields
+LES/Allwmake $targetType $*
+incompressible/Allwmake $targetType $*
+compressible/Allwmake $targetType $*
+wmake $targetType derivedFvPatchFields
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/turbulenceModels/LES/Allwmake b/src/turbulenceModels/LES/Allwmake
index 6ee54e6c27fd5bc6d13bcc096bb72b03bec83f34..a209819d1692cf6b7fc0aff02b5c1adc742c93c3 100755
--- a/src/turbulenceModels/LES/Allwmake
+++ b/src/turbulenceModels/LES/Allwmake
@@ -1,11 +1,14 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 wmakeLnInclude ../incompressible/LES
 
-wmake $makeType LESfilters
-wmake $makeType LESdeltas
+wmake $targetType LESfilters
+wmake $targetType LESdeltas
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/turbulenceModels/compressible/Allwmake b/src/turbulenceModels/compressible/Allwmake
index 6e230c01ff9ecb72284d29bda2152e1ec003466c..ec2033465e94f6513a6c59037a27e52f249a35ec 100755
--- a/src/turbulenceModels/compressible/Allwmake
+++ b/src/turbulenceModels/compressible/Allwmake
@@ -1,10 +1,13 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType turbulenceModel
-wmake $makeType RAS
-wmake $makeType LES
+wmake $targetType turbulenceModel
+wmake $targetType RAS
+wmake $targetType LES
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/turbulenceModels/incompressible/Allwmake b/src/turbulenceModels/incompressible/Allwmake
index 6e230c01ff9ecb72284d29bda2152e1ec003466c..ec2033465e94f6513a6c59037a27e52f249a35ec 100755
--- a/src/turbulenceModels/incompressible/Allwmake
+++ b/src/turbulenceModels/incompressible/Allwmake
@@ -1,10 +1,13 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $makeType turbulenceModel
-wmake $makeType RAS
-wmake $makeType LES
+wmake $targetType turbulenceModel
+wmake $targetType RAS
+wmake $targetType LES
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/wmake/Makefile b/wmake/Makefile
index 96e188530f632503c3d4902747fbd48a555072b6..38f3f1a71453a2d938438101bffe0d3c5f729b2d 100644
--- a/wmake/Makefile
+++ b/wmake/Makefile
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -37,11 +37,10 @@ SHELL      = /bin/sh
 
 
 #------------------------------------------------------------------------------
-# Initialise suffices list
+# Unset suffices list (suffix rules are not used)
 #------------------------------------------------------------------------------
 
 .SUFFIXES:
-.SUFFIXES: .o
 
 
 #------------------------------------------------------------------------------
@@ -52,23 +51,20 @@ WM_SCRIPTS   = $(WM_DIR)/scripts
 
 
 #------------------------------------------------------------------------------
-# declare default paths
+# Declare default paths
 #------------------------------------------------------------------------------
 
 LIB_SRC            = $(WM_PROJECT_DIR)/src
 LIB_PLATFORMS      = $(WM_PROJECT_DIR)/platforms/$(WM_OPTIONS)/lib
 OBJECTS_DIR        = $(MAKE_DIR)/$(WM_OPTIONS)
-CLASSES_DIR        = $(MAKE_DIR)/classes
 
 SYS_INC            =
 SYS_LIBS           =
 
-PROJECT_INC        = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude -I$(LIB_SRC)/OSspecific/$(WM_OSTYPE)/lnInclude
+PROJECT_INC        = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude \
+		     -I$(LIB_SRC)/OSspecific/$(WM_OSTYPE)/lnInclude
+
 PROJECT_LIBS       = -l$(WM_PROJECT)
-##
-## unused:
-## PROJECT_VERSION    = $(shell printf -- "-DPROJECT_VERSION=%d%03d%03d" $$(echo $(WM_PROJECT_VERSION) | sed -e 's/\./ /g'))
-##
 
 EXE_INC            =
 EXE_LIBS           =
@@ -77,14 +73,7 @@ LIB_LIBS           =
 
 
 #------------------------------------------------------------------------------
-# declare all .o files depend on $(OBJECTS_DIR)/options
-#------------------------------------------------------------------------------
-
-EXE_DEP         = $(OBJECTS_DIR)/options
-
-
-#------------------------------------------------------------------------------
-# declare default name of libraries and executables
+# Declare default name of libraries and executables
 #------------------------------------------------------------------------------
 
 # Library
@@ -101,7 +90,7 @@ SEXE            = a.out
 
 
 #------------------------------------------------------------------------------
-# set compilation and dependency building rules
+# Set compilation and dependency building rules
 #------------------------------------------------------------------------------
 
 GENERAL_RULES = $(WM_DIR)/rules/General
@@ -111,25 +100,25 @@ WMAKE_BIN     = $(WM_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER)
 include $(GENERAL_RULES)/general
 include $(RULES)/general
 include $(RULES)/$(WM_LINK_LANGUAGE)
-
-MAKE_DEP   = @$(MKDEP) $< | $(WM_SCRIPTS)/addCompile $<
+include $(GENERAL_RULES)/transform
 
 
 #------------------------------------------------------------------------------
 # Include PROJECT directory tree file and
 # source, object and dependency list files.
-# These are constructed by scripts/makeDerivedFiles
+# These are constructed by MakefileFiles
 #------------------------------------------------------------------------------
 
 include $(OBJECTS_DIR)/options
-include $(OBJECTS_DIR)/filesMacros
+include $(OBJECTS_DIR)/variables
 include $(OBJECTS_DIR)/sourceFiles
-include $(OBJECTS_DIR)/objectFiles
-include $(OBJECTS_DIR)/localObjectFiles
-include $(OBJECTS_DIR)/dependencyFiles
+DEPENDENCIES=$(SOURCE:%=$(OBJECTS_DIR)/%.dep)
+BASENAMES=$(basename $(SOURCE))
+OBJECTS=$(BASENAMES:%=$(OBJECTS_DIR)/%.o)
+
 
 #------------------------------------------------------------------------------
-# set header file include paths
+# Set header file include paths
 #------------------------------------------------------------------------------
 
 LIB_HEADER_DIRS = \
@@ -142,78 +131,82 @@ LIB_HEADER_DIRS = \
 
 
 #------------------------------------------------------------------------------
-# define link statements for executables
+# Define link statements for executables
 #------------------------------------------------------------------------------
 
-$(EXE):  $(OBJECTS)
-	     @$(WM_SCRIPTS)/makeTargetDir $(EXE)
-	     $(LINKEXE) $(OBJECTS) -L$(LIB_PLATFORMS) \
-	     $(EXE_LIBS) $(PROJECT_LIBS) $(SYS_LIBS) $(LINK_LIBS) $(GLIBS) -o $(EXE)
+$(EXE): $(OBJECTS)
+	@$(WM_SCRIPTS)/makeTargetDir $(EXE)
+	$(LINKEXE) $(OBJECTS) -L$(LIB_PLATFORMS) \
+	    $(EXE_LIBS) $(PROJECT_LIBS) $(SYS_LIBS) \
+	    $(LINK_LIBS) $(GLIBS) -o $(EXE)
 
-exe:     $(SEXE)
-	     @echo \'$(SEXE)\' is up to date.
+exe:    $(SEXE)
+	@echo \'$(SEXE)\' is up to date.
 
-$(SEXE): $(OBJECTS)
-	     @$(WM_SCRIPTS)/makeTargetDir $(SEXE)
-	     $(LINKEXE) $(OBJECTS) $(EXE_LIBS) \
-         $(SYS_LIBS) $(LINK_LIBS) $(GLIBS) -o $(SEXE)
+$(SEXE):$(OBJECTS)
+	@$(WM_SCRIPTS)/makeTargetDir $(SEXE)
+	$(LINKEXE) $(OBJECTS) $(EXE_LIBS) \
+	    $(SYS_LIBS) $(LINK_LIBS) $(GLIBS) -o $(SEXE)
 
 
 #------------------------------------------------------------------------------
-# define link statements for libraries
+# Define link statements for libraries
 #------------------------------------------------------------------------------
 
 objects: $(OBJECTS)
 
-libso:   $(LIB).$(SO)
-	     @echo \'$(LIB).$(SO)\' is up to date.
+libso:  $(LIB).$(SO)
+	@echo \'$(LIB).$(SO)\' is up to date.
 
 $(LIB).$(SO): $(OBJECTS)
-	     @$(WM_SCRIPTS)/makeTargetDir $(LIB)
-	     @rm -f so_locations
-	     @cd $(OBJECTS_DIR) ; \
-	     $(LINKLIBSO) $(LOCAL_OBJECTS) -L$(LIB_PLATFORMS) $(LIB_LIBS) $(GLIB_LIBS) -o $(LIB).$(SO)
+	@$(WM_SCRIPTS)/makeTargetDir $(LIB)
+	$(LINKLIBSO) $(OBJECTS) -L$(LIB_PLATFORMS) \
+	    $(LIB_LIBS) $(GLIB_LIBS) -o $(LIB).$(SO)
 
-lib:     $(LIB).a
-	     @echo \'$(LIB).a\' is up to date.
+lib:    $(LIB).a
+	@echo \'$(LIB).a\' is up to date.
 
 $(LIB).a: $(OBJECTS)
-	     @$(WM_SCRIPTS)/makeTargetDir $(LIB)
-	     @rm -f $(LIB).a
-	     $(AR) $(ARFLAGS) $(LIB).a $(OBJECTS)
-	     $(RANLIB) $(LIB).a
+	@$(WM_SCRIPTS)/makeTargetDir $(LIB)
+	@rm -f $(LIB).a
+	$(AR) $(ARFLAGS) $(LIB).a $(OBJECTS)
+	$(RANLIB) $(LIB).a
 
-libo:    $(LIB).o
-	     @echo \'$(LIB).o\' is up to date.
+libo:   $(LIB).o
+	@echo \'$(LIB).o\' is up to date.
 
 $(LIB).o: $(OBJECTS)
-	     @$(WM_SCRIPTS)/makeTargetDir $(LIB)
-	     @rm -f $(LIB).o
-	     $(LD) -r -o $(LIB).o $(OBJECTS)
-
-jar:     $(LIB).jar
-	     @echo \'$(LIB).jar\' is up to date.
+	@$(WM_SCRIPTS)/makeTargetDir $(LIB)
+	@rm -f $(LIB).o
+	$(LD) -r -o $(LIB).o $(OBJECTS)
 
-$(LIB).jar: $(OBJECTS)
-	     @$(WM_SCRIPTS)/makeTargetDir $(LIB)
-	     jar cfm $(LIB).jar $(LIB_LIBS) -C $(CLASSES_DIR) .
 
 #------------------------------------------------------------------------------
 # Set rule to create the include directory for libraries
 #------------------------------------------------------------------------------
 
-lnInclude/uptodate: $(MAKE_DIR)/files $(MAKE_DIR)/options
-	     @rm -rf lnInclude ; wmakeLnInclude . ; touch lnInclude/uptodate
+lnInclude: $(MAKE_DIR)/files $(MAKE_DIR)/options
+	@rm -rf lnInclude ; wmakeLnInclude .
+
+
+#------------------------------------------------------------------------------
+# Declare all qbject files depend on $(OBJECTS_DIR)/options
+#------------------------------------------------------------------------------
+
+$(OBJECTS) : $(OBJECTS_DIR)/options
+$(foreach S,$(SOURCE),$(eval $(OBJECTS_DIR)/$(basename $S).o : $(OBJECTS_DIR)/$S.dep))
 
 
 #------------------------------------------------------------------------------
 # Set depedency rule and include dependency lists
 #------------------------------------------------------------------------------
 
-$(OBJECTS_DIR)/dependencies: $(DEPENDENCIES)
-	@echo dependencies up to date > $(OBJECTS_DIR)/dependencies
+.PHONY: dep
+dep: $(DEPENDENCIES)
 
-include $(INCLUDE_DEPS)
+ifeq ($(findstring lnInclude,$(MAKECMDGOALS)),)
+-include $(DEPENDENCIES)
+endif
 
 
 #------------------------------------------------------------------------------
diff --git a/wmake/MakefileApps b/wmake/MakefileApps
index 848fbe204fdae2cb37380cd7287a919f028eab10..20955e788ea36f0ef25264cbe012fa284371d588 100644
--- a/wmake/MakefileApps
+++ b/wmake/MakefileApps
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -26,17 +26,17 @@
 #
 # Description
 #     Makefile used by
-#         wmake all
+#         wmake -all
 #     to make the applications in the subdirectories of the current directory
 #
 #------------------------------------------------------------------------------
 
-.PHONY: application $(FOAM_APPS)
-
+.PHONY: application
 application: $(FOAM_APPS)
 
+.PHONY: $(FOAM_APPS)
 $(FOAM_APPS):
-	+@wmake all $@
+	+@wmake -all $(TARGET) $@
 
 
 #------------------------------------------------------------------------------
diff --git a/wmake/MakefileFiles b/wmake/MakefileFiles
index 472a72e4a067200cf00ca46e9dd29fb1cd4eae4d..9f0ed1cf9d2a813ce6b5bdc9cdca59c81bb173a1 100644
--- a/wmake/MakefileFiles
+++ b/wmake/MakefileFiles
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -25,52 +25,60 @@
 #     MakefileFiles
 #
 # Description
-#     A Makefile for the 'files', used by wmake
+#     A Makefile for the 'options' and 'files' files, used by wmake
 #
 #------------------------------------------------------------------------------
 
 GENERAL_RULES = $(WM_DIR)/rules/General
 RULES         = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
-WM_SCRIPTS    = $(WM_DIR)/scripts
-OBJECTS_DIR   = $(WM_OPTIONS)
-FFLAGS        =
+OBJECTS_DIR   = $(MAKE_DIR)/$(WM_OPTIONS)
 
 include $(GENERAL_RULES)/general
 include $(RULES)/general
-include $(OBJECTS_DIR)/options
 
 #------------------------------------------------------------------------------
 # declare names of make system control files derived from file 'files'
 #------------------------------------------------------------------------------
 
-FILES   = $(WM_OPTIONS)/files
+OPTIONS = $(OBJECTS_DIR)/options
+FILES   = $(OBJECTS_DIR)/files
+VARS    = $(OBJECTS_DIR)/variables
+SFILES  = $(OBJECTS_DIR)/sourceFiles
 
-SFILES  = $(WM_OPTIONS)/sourceFiles
-OFILES  = $(WM_OPTIONS)/objectFiles
-DFILES  = $(WM_OPTIONS)/dependencyFiles
-IFILES  = $(WM_OPTIONS)/includeDeps
+-include $(OPTIONS)
 
 #------------------------------------------------------------------------------
 # Declare dependecy of all make system files on FILES
 # Causes all derived files to be remade if any are changed or missing
 #------------------------------------------------------------------------------
 
-allFiles : $(FILES) $(SFILES) $(OFILES) $(DFILES) $(IFILES)
+all : $(OPTIONS) $(SFILES) $(VARS)
 
-$(FILES) : files
-	@$(CPP) $(GFLAGS) $(FFLAGS) files | sed -e 's@   *@ @g' > $(FILES)
+$(OPTIONS) : $(MAKE_DIR)/options
+	@$(CPP) $(GFLAGS) $(MAKE_DIR)/options | sed -e 's@   *@ @g' > $(OPTIONS)
 
-$(SFILES): files
-	@$(WM_SCRIPTS)/makeDerivedFiles
-
-$(OFILES): files
-	@$(WM_SCRIPTS)/makeDerivedFiles
-
-$(DFILES): files
-	@$(WM_SCRIPTS)/makeDerivedFiles
-
-$(IFILES): files
-	@$(WM_SCRIPTS)/makeDerivedFiles
+$(SFILES): $(MAKE_DIR)/files
+	@$(CPP) $(GFLAGS) $(MAKE_DIR)/files | sed -e 's@   *@ @g' > $(FILES)
+	# Find all macro definitions in the files
+	@grep "=" $(FILES) > $(VARS)
+	echo "SOURCE = " > $(SFILES)
+	# Remove all macro definitions from the files list
+	@grep -v "=" $(FILES) >> $(SFILES)
+	@rm -f $(FILES)
+	# Add a newline to files to ensure the last line is followed by a newline
+	@echo "" >> $(SFILES)
+	# Remove commented lines, blank lines, and trailing blanks from files
+	@sed -i \
+	    -e '/^#/ d'         \
+	    -e '/^[ \t]*$$/ d'   \
+	    -e 's,[ \t]*$$,,'    \
+	     $(SFILES)
+	# Add backslashes
+	@sed -i \
+	    -e 's,$$, \\,'    \
+	    -e '$$s,\\,,'    \
+	    $(SFILES)
 
+$(VARS): $(SFILES)
 
 #------------------------------------------------------------------------------
diff --git a/wmake/MakefileOptions b/wmake/MakefileOptions
deleted file mode 100644
index eee4fec8dcfed16b8f2980520ce995ade5c1b838..0000000000000000000000000000000000000000
--- a/wmake/MakefileOptions
+++ /dev/null
@@ -1,54 +0,0 @@
-#-------------------------------*- makefile -*---------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-#    \\/     M anipulation  |
-#------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software: you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by
-#     the Free Software Foundation, either version 3 of the License, or
-#     (at your option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-#
-# File
-#     MakefileOptions
-#
-# Description
-#     A Makefile for the 'options', used by wmake
-#
-#------------------------------------------------------------------------------
-
-GENERAL_RULES = $(WM_DIR)/rules/General
-RULES         = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
-WM_SCRIPTS    = $(WM_DIR)/scripts
-
-include $(GENERAL_RULES)/general
-include $(RULES)/general
-
-#------------------------------------------------------------------------------
-# declare names of make system control files derived from file 'options'
-#------------------------------------------------------------------------------
-
-OPTIONS = $(WM_OPTIONS)/options
-
-#------------------------------------------------------------------------------
-# Declare dependency of all make system files on OPTIONS
-# Causes all derived files to be remade if any are changed or missing
-#------------------------------------------------------------------------------
-
-$(OPTIONS) : options
-	@$(WM_SCRIPTS)/makeDir $(WM_OPTIONS) ; $(CPP) $(GFLAGS) options | sed -e 's@   *@ @g' > $(OPTIONS)
-
-
-#------------------------------------------------------------------------------
diff --git a/wmake/makeWmake b/wmake/makeWmake
index 6c162acc9ccb549f86ab9062940cc4758f5609f4..98b5b55e14d9aa8510f27867e7f3b07229460e70 100755
--- a/wmake/makeWmake
+++ b/wmake/makeWmake
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -29,11 +29,13 @@
 #     Build platform-specific parts of wmake
 #
 #------------------------------------------------------------------------------
+Script=${0##*/}
+
 usage() {
     exec 1>&2
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
-usage: ${0##*/}
+Usage: $Script
 
   Build platform-specific parts of wmake
 
@@ -53,8 +55,7 @@ echo Build platform-specific parts of wmake
 echo
 (
     set -x
-    cd ${0%/*}/src && make $@
-    # or simply:  make -C ${0%/*}/src $@
+    make -C ${0%/*}/src $@
 )
 echo
 echo ========================================
@@ -62,4 +63,11 @@ echo Done building wmake
 echo ========================================
 echo
 
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script usage
+
 #------------------------------------------------------------------------------
diff --git a/wmake/rules/General/bison b/wmake/rules/General/bison
index dd02dbd7aa3b672a53ea1e2b351d5ec9cd2d473d..b741436ad71e67359cc57c3a2c53fc63303e4302 100644
--- a/wmake/rules/General/bison
+++ b/wmake/rules/General/bison
@@ -1,11 +1,7 @@
-.SUFFIXES: .y .Y
+SUFFIXES += .y .Y
 
-ytoo = bison -v -d -y $$SOURCE ; mv y.tab.c $*.c ; mv y.tab.h $*.h ; $(cc) $(cFLAGS) -c $*.c -o $@
+ytoo = bison -v -d -y $< ; mv y.tab.c $(@D)/$(<F).c ; mv y.tab.h $(@D)/$(<F).h ; \
+     $(cc) $(cFLAGS) -c  $(@D)/$(<F).c -o $@
 
-Ytoo = bison -v -d -y $$SOURCE ; mv y.tab.c $*.C ; mv y.tab.h $*.H ; $(CC) $(c++FLAGS) -c $*.C -o $@
-
-.y.dep:
-	$(MAKE_DEP)
-
-.Y.dep:
-	$(MAKE_DEP)
+Ytoo = bison -v -d -y $< ; mv y.tab.c $(@D)/$(<F).C ; mv y.tab.h $(@D)/$(<F).H ; \
+     $(CC) $(c++FLAGS) -c  $(@D)/$(<F).C -o $@
diff --git a/wmake/rules/General/btyacc b/wmake/rules/General/btyacc
index aaec4406fd013c14037994dd8034b351b49f871c..44a58c3968c3fe299d24a8e8f7b304b706f454ec 100644
--- a/wmake/rules/General/btyacc
+++ b/wmake/rules/General/btyacc
@@ -1,6 +1,4 @@
-.SUFFIXES: .y
+SUFFIXES += .y
 
-ytoo = btyacc -v -d $(SKELETON) $$SOURCE ; mv y_tab.c $*.C ; mv y_tab.h $*.H ; $(CC) $(c++FLAGS) -c $*.C -o $@
-
-.y.dep:
-	$(MAKE_DEP)
+ytoo = btyacc -v -d $(SKELETON) $< ; mv y_tab.c $(@D)/$(<F).C ; mv y_tab.h $(@D)/$(<F).H ; \
+     $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
diff --git a/wmake/rules/General/btyacc++ b/wmake/rules/General/btyacc++
index 0d2bd33ea78167738bc9e2248b1f59c88d98d1c1..784455854109589eaaefc0643bbb7d871ebbfdda 100644
--- a/wmake/rules/General/btyacc++
+++ b/wmake/rules/General/btyacc++
@@ -1,6 +1,4 @@
-.SUFFIXES: .Y
+SUFFIXES += .Y
 
-Ytoo = btyacc++ -v -d $(SKELETON) $$SOURCE ; mv y_tab.c $*.C ; mv y_tab.h $*.H ; $(CC) $(c++FLAGS) -c $*.C -o $@
-
-.Y.dep:
-	$(MAKE_DEP)
+Ytoo = btyacc++ -v -d $(SKELETON) $< ; mv y_tab.c $(@D)/$(<F).C ; mv y_tab.h $(@D)/$(<F).H ; \
+     $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
diff --git a/wmake/rules/General/byacc b/wmake/rules/General/byacc
index e3393ee7ff198e7bdac823c557dbe2666c49fb3d..60a9e18f593df07fe646450e4c11f84190b305c7 100644
--- a/wmake/rules/General/byacc
+++ b/wmake/rules/General/byacc
@@ -1,6 +1,4 @@
-.SUFFIXES: .y
+SUFFIXES += .y
 
-ytoo = byacc -v $(YYPREFIX) -d $$SOURCE ; mv y.tab.c $*.C ; mv y.tab.h $*.H ; $(CC) $(c++FLAGS) -c $*.C -o $@
-
-.y.dep:
-	$(MAKE_DEP)
+ytoo = byacc -v $(YYPREFIX) -d $< ; mv y.tab.c $(@D)/$(<F).C ; mv y.tab.h $(@D)/$(<F).H ; \
+     $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
diff --git a/wmake/rules/General/coco-cpp b/wmake/rules/General/coco-cpp
index 94264971dcde85be7fa796821b75c4c49b355acb..009c49e71e5f9232a558cd90e9de8996a7c78acd 100644
--- a/wmake/rules/General/coco-cpp
+++ b/wmake/rules/General/coco-cpp
@@ -3,13 +3,10 @@
 #     http://github.com/olesenm/coco-cpp/
 #
 
-.SUFFIXES: .atg
+SUFFIXES += .atg
 
 atgtoo =  \
     $(WM_THIRD_PARTY_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER)/coco-cpp/bin/coco-cpp \
     -single \
-    $$SOURCE -o $(OBJECTS_DIR) && \
-    $(CC) $(c++FLAGS) -c $*.cpp -o $@
-
-.atg.dep:
-	$(MAKE_DEP)
+    $< -o $(OBJECTS_DIR) && \
+    $(CC) $(c++FLAGS) -c $(@D)/$(<F).cpp -o $@
diff --git a/wmake/rules/General/flex b/wmake/rules/General/flex
index 853780e1bdfeef92b3f80d0035691d2844cf7aef..2b65bb24622792867f3916b81bf0f28e86def5d9 100644
--- a/wmake/rules/General/flex
+++ b/wmake/rules/General/flex
@@ -1,6 +1,3 @@
-.SUFFIXES: .l
+SUFFIXES += .l
 
-ltoo = flex -o$*.c $$SOURCE ; $(cc) $(cFLAGS) -c $*.c -o $@
-
-.l.dep:
-	$(MAKE_DEP)
+ltoo = flex -o $(@D)/$(<F).c $< ; $(cc) $(cFLAGS) -c  $(@D)/$(<F).c -o $@
diff --git a/wmake/rules/General/flex++ b/wmake/rules/General/flex++
index cf829e09bcfe5cd8093ea5ec0ae1c9c90c6b60d0..9f06801520de63bbbed318e902a43b307f5133fb 100644
--- a/wmake/rules/General/flex++
+++ b/wmake/rules/General/flex++
@@ -1,6 +1,3 @@
-.SUFFIXES: .L
+SUFFIXES += .L
 
-Ltoo = flex -+ -o$*.C -f $$SOURCE ; $(CC) $(c++FLAGS) -c $*.C -o $@
-
-.L.dep:
-	$(MAKE_DEP)
+Ltoo = flex -+ -o$(@D)/$(<F).C -f $< ; $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
diff --git a/wmake/rules/General/general b/wmake/rules/General/general
index d0253e80b313ae029a89d47ce5bf7282930770b9..f9f83f061b565421b701291d78c81fb3ba459c41 100644
--- a/wmake/rules/General/general
+++ b/wmake/rules/General/general
@@ -1,3 +1,5 @@
+#-------------------------------*- makefile -*---------------------------------
+
 AR         = ar
 ARFLAGS    = cr
 RANLIB     = ranlib
@@ -8,3 +10,5 @@ GFLAGS     = -D$(WM_ARCH) -DWM_$(WM_PRECISION_OPTION)
 GINC       =
 GLIBS      = -lm
 GLIB_LIBS  =
+
+#------------------------------------------------------------------------------
diff --git a/wmake/rules/General/moc b/wmake/rules/General/moc
index f47f586a3a3117de65f680721f9706440525a616..93749733e7f1b45c6ba7531d192ebe2c1f4567d4 100644
--- a/wmake/rules/General/moc
+++ b/wmake/rules/General/moc
@@ -1,6 +1,3 @@
-.SUFFIXES: .qt
+SUFFIXES += .qt
 
-qttoo = $(QTDIR)/bin/moc -f $$SOURCE -o $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
-
-.qt.dep:
-	$(MAKE_DEP)
+qttoo = $(QTDIR)/bin/moc -f $< -o $(@D)/$(<F).C ; $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
diff --git a/wmake/rules/General/mplibGAMMA b/wmake/rules/General/mplibGAMMA
deleted file mode 100644
index 11606f298493baf45a00be98c5147d386e67a36d..0000000000000000000000000000000000000000
--- a/wmake/rules/General/mplibGAMMA
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include
-PLIBS      = -L$(MPI_ARCH_PATH)/lib -lgamma
diff --git a/wmake/rules/General/sourceToDep b/wmake/rules/General/sourceToDep
deleted file mode 100644
index 329e7f409dc0dd8adcfa63432f7f2c2f1a0d5f98..0000000000000000000000000000000000000000
--- a/wmake/rules/General/sourceToDep
+++ /dev/null
@@ -1,24 +0,0 @@
-.SUFFIXES: .c .cc .cxx .cpp .C .F .f .dep
-
-MKDEP       = $(WMAKE_BIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS)
-
-.c.dep:
-	$(MAKE_DEP)
-
-.cc.dep:
-	$(MAKE_DEP)
-
-.cxx.dep:
-	$(MAKE_DEP)
-
-.cpp.dep:
-	$(MAKE_DEP)
-
-.C.dep:
-	$(MAKE_DEP)
-
-.F.dep:
-	$(MAKE_DEP)
-
-.f.dep:
-	$(MAKE_DEP)
diff --git a/wmake/rules/General/standard b/wmake/rules/General/standard
index d3e977df09f2799ba2c3240a6edda2c6ec05f99d..3a51d72260a21d8608c99d32a715235593d57e18 100644
--- a/wmake/rules/General/standard
+++ b/wmake/rules/General/standard
@@ -1,7 +1,8 @@
-include $(GENERAL_RULES)/version
+#-------------------------------*- makefile -*---------------------------------
 
-include $(GENERAL_RULES)/sourceToDep
+SUFFIXES=
 
+include $(GENERAL_RULES)/version
 include $(GENERAL_RULES)/flex
 include $(GENERAL_RULES)/flex++
 ## include $(GENERAL_RULES)/coco-cpp
@@ -9,5 +10,6 @@ include $(GENERAL_RULES)/flex++
 ## include $(GENERAL_RULES)/btyacc++
 include $(GENERAL_RULES)/bison
 include $(GENERAL_RULES)/moc
-
 include $(GENERAL_RULES)/X
+
+#------------------------------------------------------------------------------
diff --git a/wmake/rules/General/transform b/wmake/rules/General/transform
new file mode 100644
index 0000000000000000000000000000000000000000..bffe6055c0c4e64e19bbad3c62dd35d981df5606
--- /dev/null
+++ b/wmake/rules/General/transform
@@ -0,0 +1,15 @@
+#-------------------------------*- makefile -*---------------------------------
+
+define DEFINE_TRANSFORM
+$(OBJECTS_DIR)/%.o : %$1
+	$$($(subst .,,$(1))too)
+endef
+
+$(foreach s,$(SUFFIXES),$(eval $(call DEFINE_TRANSFORM,$(s))))
+
+$(OBJECTS_DIR)/%.dep : %
+	@$(WM_SCRIPTS)/makeTargetDir $@
+	@$(WMAKE_BIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS) $< | \
+	    sed 's,$(WM_PROJECT_DIR),$$(WM_PROJECT_DIR),' > $@
+
+#------------------------------------------------------------------------------
diff --git a/wmake/rules/General/version b/wmake/rules/General/version
index 19633ffc9dca7796939cdd4fe33b7ae9a1f4fd18..ffd070d0be814cc26573ba6e6071af419a5d0f55 100644
--- a/wmake/rules/General/version
+++ b/wmake/rules/General/version
@@ -1,13 +1,12 @@
-.SUFFIXES: .Cver
+#-------------------------------*- makefile -*---------------------------------
 
-#
-# update version strings in C++ file and in $WM_PROJECT_DIR/.build file
-#
+SUFFIXES += .Cver
+
+# Update version strings in C++ file and in $WM_PROJECT_DIR/.build file
 Cvertoo = \
     sed -e 's!VERSION_STRING!$(shell wmakePrintBuild -major)!' \
         -e 's!BUILD_STRING!$(shell wmakePrintBuild -update)!' \
-        $$SOURCE > $*.C; \
-    $(CC) $(c++FLAGS) -c $*.C -o $@
+        $< > $(@D)/$(<F).C; \
+    $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
 
-.Cver.dep:
-	$(MAKE_DEP)
+#------------------------------------------------------------------------------
diff --git a/wmake/rules/General/yacc b/wmake/rules/General/yacc
index 959d4297374609c8d23c683fba5678d16c94ad54..d583a63f06d3fecd760fe99ade97a9098b70f720 100644
--- a/wmake/rules/General/yacc
+++ b/wmake/rules/General/yacc
@@ -1,11 +1,7 @@
-.SUFFIXES: .y .Y
+SUFFIXES += .y .Y
 
-ytoo = yacc -v -d $$SOURCE ; mv y.tab.c $*.c ; mv y.tab.h $(@D)/parser.h ; $(CC) $(c++FLAGS) -c $*.c -o $@
+ytoo = yacc -v -d $< ; mv y.tab.c $(@D)/$(<F).c ; mv y.tab.h $(@D)/parser.h ; \
+     $(CC) $(c++FLAGS) -c $(@D)/$(<F).c -o $@
 
-Ytoo = yacc -v -d $$SOURCE ; mv y.tab.c $*.C ; mv y.tab.h $(@D)/parser.H ; $(CC) $(c++FLAGS) -c $*.C -o $@
-
-.y.dep:
-	$(MAKE_DEP)
-
-.Y.dep:
-	$(MAKE_DEP)
+Ytoo = yacc -v -d $< ; mv y.tab.c $(@D)/$(<F).C ; mv y.tab.h $(@D)/parser.H ; \
+     $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
diff --git a/wmake/rules/SunOS64Gcc/c b/wmake/rules/SunOS64Gcc/c
deleted file mode 100644
index f4114be3143d1210ffea500a2b361008910abed0..0000000000000000000000000000000000000000
--- a/wmake/rules/SunOS64Gcc/c
+++ /dev/null
@@ -1,16 +0,0 @@
-.SUFFIXES: .c .h
-
-cWARN        = -Wall
-
-cc          = gcc -m64
-
-include $(RULES)/c$(WM_COMPILE_OPTION)
-
-cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
-
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
-
-LINK_LIBS   = $(cDBUG)
-
-LINKLIBSO   = $(cc) -shared
-LINKEXE     = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
diff --git a/wmake/rules/SunOS64Gcc/c++ b/wmake/rules/SunOS64Gcc/c++
deleted file mode 100644
index 3ca193e296dc3a739a5eac704b9c442fcb1d1fcb..0000000000000000000000000000000000000000
--- a/wmake/rules/SunOS64Gcc/c++
+++ /dev/null
@@ -1,21 +0,0 @@
-.SUFFIXES: .C .cxx .cc .cpp
-
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
-
-CC          = g++ -m64
-
-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
-
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
-cxxtoo      = $(Ctoo)
-cctoo       = $(Ctoo)
-cpptoo      = $(Ctoo)
-
-LINK_LIBS   = $(c++DBUG)
-
-LINKLIBSO   = $(CC) $(c++FLAGS) -shared
-LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed
diff --git a/wmake/rules/linux64Clang/c b/wmake/rules/linux64Clang/c
index 7d7d4f61a1bc410e3c4f9e51aca63b28f9f6d91f..e882186177c90bd066b27e5a94d5a8fbab89da95 100644
--- a/wmake/rules/linux64Clang/c
+++ b/wmake/rules/linux64Clang/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linux64Clang/c++ b/wmake/rules/linux64Clang/c++
index 1a0343b5cfc81819819cf26dd254bf26613998e1..1d6d2b041c551dd9299dfe26fa8ff9022595d90f 100644
--- a/wmake/rules/linux64Clang/c++
+++ b/wmake/rules/linux64Clang/c++
@@ -1,8 +1,7 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
 # -Woverloaded-virtual may produce spurious warnings, disable for now
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison
-
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison -Wno-invalid-offsetof
 
 # Suppress CGAL warnings
 c++CGALWARN = -Wno-c++11-extensions -Wno-sometimes-uninitialized -Wno-mismatched-tags
@@ -15,7 +14,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linux64Gcc++0x/c b/wmake/rules/linux64Gcc++0x/c
deleted file mode 100644
index f4114be3143d1210ffea500a2b361008910abed0..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/c
+++ /dev/null
@@ -1,16 +0,0 @@
-.SUFFIXES: .c .h
-
-cWARN        = -Wall
-
-cc          = gcc -m64
-
-include $(RULES)/c$(WM_COMPILE_OPTION)
-
-cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
-
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
-
-LINK_LIBS   = $(cDBUG)
-
-LINKLIBSO   = $(cc) -shared
-LINKEXE     = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
diff --git a/wmake/rules/linux64Gcc++0x/c++ b/wmake/rules/linux64Gcc++0x/c++
deleted file mode 100644
index ff7cf481fdca99a4c2c276f3dc3c9e54a4bf9c32..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/c++
+++ /dev/null
@@ -1,21 +0,0 @@
-.SUFFIXES: .C .cxx .cc .cpp
-
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor
-
-CC          = g++ -m64 -std=c++0x
-
-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
-
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
-cxxtoo      = $(Ctoo)
-cctoo       = $(Ctoo)
-cpptoo      = $(Ctoo)
-
-LINK_LIBS   = $(c++DBUG)
-
-LINKLIBSO   = $(CC) $(c++FLAGS) -shared
-LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed
diff --git a/wmake/rules/linux64Gcc++0x/c++Debug b/wmake/rules/linux64Gcc++0x/c++Debug
deleted file mode 100644
index 19bdb9c3346fc7a69380dfedd6e7911fe220a965..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/c++Debug
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -ggdb3 -DFULLDEBUG
-c++OPT      = -O0 -fdefault-inline
diff --git a/wmake/rules/linux64Gcc++0x/c++Opt b/wmake/rules/linux64Gcc++0x/c++Opt
deleted file mode 100644
index 3363be80905262684d0f126daa1cd6388231184d..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/c++Opt
+++ /dev/null
@@ -1,3 +0,0 @@
-#c++DBUG     = -O0 -DFULLDEBUG -g
-c++DBUG     =
-c++OPT      = -O3
diff --git a/wmake/rules/linux64Gcc++0x/c++Prof b/wmake/rules/linux64Gcc++0x/c++Prof
deleted file mode 100644
index 3bda4dad55e898a8198f6e8bfe21e8d829d7230a..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/c++Prof
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -pg
-c++OPT     = -O2
diff --git a/wmake/rules/linux64Gcc++0x/cDebug b/wmake/rules/linux64Gcc++0x/cDebug
deleted file mode 100644
index 72b638f458220e329d52b59e3566a3c807101f9d..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/cDebug
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -ggdb -DFULLDEBUG
-cOPT        = -O1 -fdefault-inline -finline-functions
diff --git a/wmake/rules/linux64Gcc++0x/cOpt b/wmake/rules/linux64Gcc++0x/cOpt
deleted file mode 100644
index 17318709f1fa39e6bf89cbe87778bc6fa459de17..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/cOpt
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       =
-cOPT        = -O3
diff --git a/wmake/rules/linux64Gcc++0x/cProf b/wmake/rules/linux64Gcc++0x/cProf
deleted file mode 100644
index ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/cProf
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -pg
-cOPT        = -O2
diff --git a/wmake/rules/linux64Gcc++0x/general b/wmake/rules/linux64Gcc++0x/general
deleted file mode 100644
index 243cb7d8c7657e61f69a0628d869643a1a6186f4..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/general
+++ /dev/null
@@ -1,8 +0,0 @@
-CPP        = cpp -traditional-cpp $(GFLAGS)
-
-PROJECT_LIBS = -l$(WM_PROJECT) -ldl
-
-include $(GENERAL_RULES)/standard
-
-include $(RULES)/c
-include $(RULES)/c++
diff --git a/wmake/rules/linux64Gcc++0x/mplibHPMPI b/wmake/rules/linux64Gcc++0x/mplibHPMPI
deleted file mode 100644
index 574492a236a32f7d87d00bf0e3507a5ac8e54f55..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/mplibHPMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
-PLIBS      = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi
diff --git a/wmake/rules/linux64Gcc++0x/mplibINTELMPI b/wmake/rules/linux64Gcc++0x/mplibINTELMPI
deleted file mode 100644
index cf80ec2eaf68d1c2f6adf208964b6490c4c8fd36..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc++0x/mplibINTELMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include64
-PLIBS      = -L$(MPI_ARCH_PATH)/lib64 -lmpi
diff --git a/wmake/rules/linux64Gcc/c b/wmake/rules/linux64Gcc/c
index f4114be3143d1210ffea500a2b361008910abed0..66435ccf057a04d5051164eb65f110c6eb476c6b 100644
--- a/wmake/rules/linux64Gcc/c
+++ b/wmake/rules/linux64Gcc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linux64Gcc/c++ b/wmake/rules/linux64Gcc/c++
index 3dfb03336039da5c3f40cf53934d0fc18ca09599..a23dd820efe39e2ae1b3365700e5822d5bcac7e1 100644
--- a/wmake/rules/linux64Gcc/c++
+++ b/wmake/rules/linux64Gcc/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m64
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linux64Gcc43/c++Debug b/wmake/rules/linux64Gcc43/c++Debug
deleted file mode 100644
index 19bdb9c3346fc7a69380dfedd6e7911fe220a965..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc43/c++Debug
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -ggdb3 -DFULLDEBUG
-c++OPT      = -O0 -fdefault-inline
diff --git a/wmake/rules/linux64Gcc43/c++Opt b/wmake/rules/linux64Gcc43/c++Opt
deleted file mode 100644
index 3446f7f58cbeb23e1753e982a9734bbf1a180b43..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc43/c++Opt
+++ /dev/null
@@ -1,4 +0,0 @@
-c++DBUG     =
-c++OPT      = -O3
-#c++OPT      = -march=nocona -O3
-# -ftree-vectorize -ftree-vectorizer-verbose=3
diff --git a/wmake/rules/linux64Gcc43/c++Prof b/wmake/rules/linux64Gcc43/c++Prof
deleted file mode 100644
index 3bda4dad55e898a8198f6e8bfe21e8d829d7230a..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc43/c++Prof
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -pg
-c++OPT     = -O2
diff --git a/wmake/rules/linux64Gcc43/cDebug b/wmake/rules/linux64Gcc43/cDebug
deleted file mode 100644
index 72b638f458220e329d52b59e3566a3c807101f9d..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc43/cDebug
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -ggdb -DFULLDEBUG
-cOPT        = -O1 -fdefault-inline -finline-functions
diff --git a/wmake/rules/linux64Gcc43/cOpt b/wmake/rules/linux64Gcc43/cOpt
deleted file mode 100644
index 17318709f1fa39e6bf89cbe87778bc6fa459de17..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc43/cOpt
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       =
-cOPT        = -O3
diff --git a/wmake/rules/linux64Gcc43/cProf b/wmake/rules/linux64Gcc43/cProf
deleted file mode 100644
index ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc43/cProf
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -pg
-cOPT        = -O2
diff --git a/wmake/rules/linux64Gcc43/general b/wmake/rules/linux64Gcc43/general
deleted file mode 100644
index 243cb7d8c7657e61f69a0628d869643a1a6186f4..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc43/general
+++ /dev/null
@@ -1,8 +0,0 @@
-CPP        = cpp -traditional-cpp $(GFLAGS)
-
-PROJECT_LIBS = -l$(WM_PROJECT) -ldl
-
-include $(GENERAL_RULES)/standard
-
-include $(RULES)/c
-include $(RULES)/c++
diff --git a/wmake/rules/linux64Gcc43/mplibHPMPI b/wmake/rules/linux64Gcc43/mplibHPMPI
deleted file mode 100644
index 574492a236a32f7d87d00bf0e3507a5ac8e54f55..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc43/mplibHPMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
-PLIBS      = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi
diff --git a/wmake/rules/linux64Gcc43/mplibINTELMPI b/wmake/rules/linux64Gcc43/mplibINTELMPI
deleted file mode 100644
index cf80ec2eaf68d1c2f6adf208964b6490c4c8fd36..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc43/mplibINTELMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include64
-PLIBS      = -L$(MPI_ARCH_PATH)/lib64 -lmpi
diff --git a/wmake/rules/linux64Gcc44/c b/wmake/rules/linux64Gcc44/c
deleted file mode 100644
index f4114be3143d1210ffea500a2b361008910abed0..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/c
+++ /dev/null
@@ -1,16 +0,0 @@
-.SUFFIXES: .c .h
-
-cWARN        = -Wall
-
-cc          = gcc -m64
-
-include $(RULES)/c$(WM_COMPILE_OPTION)
-
-cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
-
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
-
-LINK_LIBS   = $(cDBUG)
-
-LINKLIBSO   = $(cc) -shared
-LINKEXE     = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
diff --git a/wmake/rules/linux64Gcc44/c++ b/wmake/rules/linux64Gcc44/c++
deleted file mode 100644
index 3ca193e296dc3a739a5eac704b9c442fcb1d1fcb..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/c++
+++ /dev/null
@@ -1,21 +0,0 @@
-.SUFFIXES: .C .cxx .cc .cpp
-
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
-
-CC          = g++ -m64
-
-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
-
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
-cxxtoo      = $(Ctoo)
-cctoo       = $(Ctoo)
-cpptoo      = $(Ctoo)
-
-LINK_LIBS   = $(c++DBUG)
-
-LINKLIBSO   = $(CC) $(c++FLAGS) -shared
-LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed
diff --git a/wmake/rules/linux64Gcc44/c++Debug b/wmake/rules/linux64Gcc44/c++Debug
deleted file mode 100644
index 19bdb9c3346fc7a69380dfedd6e7911fe220a965..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/c++Debug
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -ggdb3 -DFULLDEBUG
-c++OPT      = -O0 -fdefault-inline
diff --git a/wmake/rules/linux64Gcc44/c++Opt b/wmake/rules/linux64Gcc44/c++Opt
deleted file mode 100644
index 3446f7f58cbeb23e1753e982a9734bbf1a180b43..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/c++Opt
+++ /dev/null
@@ -1,4 +0,0 @@
-c++DBUG     =
-c++OPT      = -O3
-#c++OPT      = -march=nocona -O3
-# -ftree-vectorize -ftree-vectorizer-verbose=3
diff --git a/wmake/rules/linux64Gcc44/c++Prof b/wmake/rules/linux64Gcc44/c++Prof
deleted file mode 100644
index 3bda4dad55e898a8198f6e8bfe21e8d829d7230a..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/c++Prof
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -pg
-c++OPT     = -O2
diff --git a/wmake/rules/linux64Gcc44/cDebug b/wmake/rules/linux64Gcc44/cDebug
deleted file mode 100644
index 72b638f458220e329d52b59e3566a3c807101f9d..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/cDebug
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -ggdb -DFULLDEBUG
-cOPT        = -O1 -fdefault-inline -finline-functions
diff --git a/wmake/rules/linux64Gcc44/cOpt b/wmake/rules/linux64Gcc44/cOpt
deleted file mode 100644
index 17318709f1fa39e6bf89cbe87778bc6fa459de17..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/cOpt
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       =
-cOPT        = -O3
diff --git a/wmake/rules/linux64Gcc44/cProf b/wmake/rules/linux64Gcc44/cProf
deleted file mode 100644
index ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/cProf
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -pg
-cOPT        = -O2
diff --git a/wmake/rules/linux64Gcc44/general b/wmake/rules/linux64Gcc44/general
deleted file mode 100644
index 243cb7d8c7657e61f69a0628d869643a1a6186f4..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/general
+++ /dev/null
@@ -1,8 +0,0 @@
-CPP        = cpp -traditional-cpp $(GFLAGS)
-
-PROJECT_LIBS = -l$(WM_PROJECT) -ldl
-
-include $(GENERAL_RULES)/standard
-
-include $(RULES)/c
-include $(RULES)/c++
diff --git a/wmake/rules/linux64Gcc44/mplibHPMPI b/wmake/rules/linux64Gcc44/mplibHPMPI
deleted file mode 100644
index 574492a236a32f7d87d00bf0e3507a5ac8e54f55..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/mplibHPMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
-PLIBS      = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi
diff --git a/wmake/rules/linux64Gcc44/mplibINTELMPI b/wmake/rules/linux64Gcc44/mplibINTELMPI
deleted file mode 100644
index cf80ec2eaf68d1c2f6adf208964b6490c4c8fd36..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc44/mplibINTELMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     = -DMPICH_SKIP_MPICXX
-PINC       = -I$(MPI_ARCH_PATH)/include64
-PLIBS      = -L$(MPI_ARCH_PATH)/lib64 -lmpi
diff --git a/wmake/rules/linux64Gcc45/c b/wmake/rules/linux64Gcc45/c
index f4114be3143d1210ffea500a2b361008910abed0..66435ccf057a04d5051164eb65f110c6eb476c6b 100644
--- a/wmake/rules/linux64Gcc45/c
+++ b/wmake/rules/linux64Gcc45/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linux64Gcc45/c++ b/wmake/rules/linux64Gcc45/c++
index 98b25ed1fea2a1baa0ad749c09a76bd877ea4a6d..a23dd820efe39e2ae1b3365700e5822d5bcac7e1 100644
--- a/wmake/rules/linux64Gcc45/c++
+++ b/wmake/rules/linux64Gcc45/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m64
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linux64Gcc46/c b/wmake/rules/linux64Gcc46/c
index f4114be3143d1210ffea500a2b361008910abed0..66435ccf057a04d5051164eb65f110c6eb476c6b 100644
--- a/wmake/rules/linux64Gcc46/c
+++ b/wmake/rules/linux64Gcc46/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linux64Gcc46/c++ b/wmake/rules/linux64Gcc46/c++
index 98b25ed1fea2a1baa0ad749c09a76bd877ea4a6d..a23dd820efe39e2ae1b3365700e5822d5bcac7e1 100644
--- a/wmake/rules/linux64Gcc46/c++
+++ b/wmake/rules/linux64Gcc46/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m64
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linux64Gcc47/c b/wmake/rules/linux64Gcc47/c
index f4114be3143d1210ffea500a2b361008910abed0..66435ccf057a04d5051164eb65f110c6eb476c6b 100644
--- a/wmake/rules/linux64Gcc47/c
+++ b/wmake/rules/linux64Gcc47/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linux64Gcc47/c++ b/wmake/rules/linux64Gcc47/c++
index 98b25ed1fea2a1baa0ad749c09a76bd877ea4a6d..a23dd820efe39e2ae1b3365700e5822d5bcac7e1 100644
--- a/wmake/rules/linux64Gcc47/c++
+++ b/wmake/rules/linux64Gcc47/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m64
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linux64Gcc48/c b/wmake/rules/linux64Gcc48/c
index f4114be3143d1210ffea500a2b361008910abed0..66435ccf057a04d5051164eb65f110c6eb476c6b 100644
--- a/wmake/rules/linux64Gcc48/c
+++ b/wmake/rules/linux64Gcc48/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linux64Gcc48/c++ b/wmake/rules/linux64Gcc48/c++
index 98b25ed1fea2a1baa0ad749c09a76bd877ea4a6d..a23dd820efe39e2ae1b3365700e5822d5bcac7e1 100644
--- a/wmake/rules/linux64Gcc48/c++
+++ b/wmake/rules/linux64Gcc48/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m64
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linux64Gcc49/c b/wmake/rules/linux64Gcc49/c
index f4114be3143d1210ffea500a2b361008910abed0..66435ccf057a04d5051164eb65f110c6eb476c6b 100644
--- a/wmake/rules/linux64Gcc49/c
+++ b/wmake/rules/linux64Gcc49/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linux64Gcc49/c++ b/wmake/rules/linux64Gcc49/c++
index 98b25ed1fea2a1baa0ad749c09a76bd877ea4a6d..a23dd820efe39e2ae1b3365700e5822d5bcac7e1 100644
--- a/wmake/rules/linux64Gcc49/c++
+++ b/wmake/rules/linux64Gcc49/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m64
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linux64Icc/c b/wmake/rules/linux64Icc/c
index 1085d50498d3fb5e5aeab451a90bdbb5b4d8fa83..97da5c28f0a76d6cd12db86353f8fe938ec81edd 100644
--- a/wmake/rules/linux64Icc/c
+++ b/wmake/rules/linux64Icc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        =
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG) -L$(IA32ROOT)/lib
 
diff --git a/wmake/rules/linux64Icc/c++ b/wmake/rules/linux64Icc/c++
index 51cb6a389cee007ce892f77b966fb6a8f1e803b1..eb8edb90b687e1356c0f57b711e1c992d4cde3d7 100644
--- a/wmake/rules/linux64Icc/c++
+++ b/wmake/rules/linux64Icc/c++
@@ -1,4 +1,4 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
 c++WARN     = -wd327,525,654,819,1125,1476,1505,1572
 
@@ -10,7 +10,7 @@ ptFLAGS     = -DNoRepository
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxARM7Gcc/c b/wmake/rules/linuxARM7Gcc/c
index 5be3206f843bba17a0e86f7a1c1b60093fc882be..d7bda5d1df864e2a703994bbe92d51586f9da7be 100644
--- a/wmake/rules/linuxARM7Gcc/c
+++ b/wmake/rules/linuxARM7Gcc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxARM7Gcc/c++ b/wmake/rules/linuxARM7Gcc/c++
index 10d6b9cb33051e819e125c045ed80fc6fd453fdd..408abf76656871e859ab4e19bc99cff75421252f 100644
--- a/wmake/rules/linuxARM7Gcc/c++
+++ b/wmake/rules/linuxARM7Gcc/c++
@@ -1,6 +1,6 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wno-invalid-offsetof
 
 CC          = g++
 
@@ -10,7 +10,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxClang/c b/wmake/rules/linuxClang/c
index 99b3238306b8c10944010169d73283061bc75aaa..7d67b4c02239e72376fc2036d3cee8926cc017a9 100644
--- a/wmake/rules/linuxClang/c
+++ b/wmake/rules/linuxClang/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxClang/c++ b/wmake/rules/linuxClang/c++
index 49849377a6214a1e2520318dcea97d2a01263abd..cf3745790811d8fb111d6d9b244799d6eea93ad5 100644
--- a/wmake/rules/linuxClang/c++
+++ b/wmake/rules/linuxClang/c++
@@ -1,8 +1,7 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
 # -Woverloaded-virtual may produce spurious warnings, disable for now
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison
-
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison -Wno-invalid-offsetof
 
 # Suppress CGAL warnings
 c++CGALWARN = -Wno-c++11-extensions -Wno-sometimes-uninitialized -Wno-mismatched-tags
@@ -15,7 +14,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxGcc/c b/wmake/rules/linuxGcc/c
index d914fcd37d084b82a1833722d6ad7a0db3dd1c93..81c64cf710b3122b58e483154db6e852977d0c9b 100644
--- a/wmake/rules/linuxGcc/c
+++ b/wmake/rules/linuxGcc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxGcc/c++ b/wmake/rules/linuxGcc/c++
index 357f4106e10d7d1108a6713802e6f0d01cd8be9a..b00d78f9848f52d3a3e213b6a0b1d757e8bddd2e 100644
--- a/wmake/rules/linuxGcc/c++
+++ b/wmake/rules/linuxGcc/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m32
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxGcc43/c b/wmake/rules/linuxGcc43/c
deleted file mode 100644
index d914fcd37d084b82a1833722d6ad7a0db3dd1c93..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/c
+++ /dev/null
@@ -1,16 +0,0 @@
-.SUFFIXES: .c .h
-
-cWARN        = -Wall
-
-cc          = gcc -m32
-
-include $(RULES)/c$(WM_COMPILE_OPTION)
-
-cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
-
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
-
-LINK_LIBS   = $(cDBUG)
-
-LINKLIBSO   = $(cc) -shared
-LINKEXE     = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
diff --git a/wmake/rules/linuxGcc43/c++ b/wmake/rules/linuxGcc43/c++
deleted file mode 100644
index e862181fc5c293e1dc6b46f06acad3b72522eb41..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/c++
+++ /dev/null
@@ -1,21 +0,0 @@
-.SUFFIXES: .C .cxx .cc .cpp
-
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
-
-CC          = g++ -m32
-
-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
-
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
-cxxtoo      = $(Ctoo)
-cctoo       = $(Ctoo)
-cpptoo      = $(Ctoo)
-
-LINK_LIBS   = $(c++DBUG)
-
-LINKLIBSO   = $(CC) $(c++FLAGS) -shared
-LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed
diff --git a/wmake/rules/linuxGcc43/c++Debug b/wmake/rules/linuxGcc43/c++Debug
deleted file mode 100644
index 19bdb9c3346fc7a69380dfedd6e7911fe220a965..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/c++Debug
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -ggdb3 -DFULLDEBUG
-c++OPT      = -O0 -fdefault-inline
diff --git a/wmake/rules/linuxGcc43/c++Opt b/wmake/rules/linuxGcc43/c++Opt
deleted file mode 100644
index 2aedabd6280a3476bc58db13139a0a3aa579502b..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/c++Opt
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG     =
-c++OPT      = -O3
diff --git a/wmake/rules/linuxGcc43/c++Prof b/wmake/rules/linuxGcc43/c++Prof
deleted file mode 100644
index 3bda4dad55e898a8198f6e8bfe21e8d829d7230a..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/c++Prof
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -pg
-c++OPT     = -O2
diff --git a/wmake/rules/linuxGcc43/cDebug b/wmake/rules/linuxGcc43/cDebug
deleted file mode 100644
index 72b638f458220e329d52b59e3566a3c807101f9d..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/cDebug
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -ggdb -DFULLDEBUG
-cOPT        = -O1 -fdefault-inline -finline-functions
diff --git a/wmake/rules/linuxGcc43/cOpt b/wmake/rules/linuxGcc43/cOpt
deleted file mode 100644
index 17318709f1fa39e6bf89cbe87778bc6fa459de17..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/cOpt
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       =
-cOPT        = -O3
diff --git a/wmake/rules/linuxGcc43/cProf b/wmake/rules/linuxGcc43/cProf
deleted file mode 100644
index ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/cProf
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -pg
-cOPT        = -O2
diff --git a/wmake/rules/linuxGcc43/general b/wmake/rules/linuxGcc43/general
deleted file mode 100644
index fa1eb5b925f5d6e3a87ea2bba97f2163aaa42558..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/general
+++ /dev/null
@@ -1,9 +0,0 @@
-CPP        = cpp -traditional-cpp $(GFLAGS)
-LD         = ld -melf_i386
-
-PROJECT_LIBS = -l$(WM_PROJECT) -ldl
-
-include $(GENERAL_RULES)/standard
-
-include $(RULES)/c
-include $(RULES)/c++
diff --git a/wmake/rules/linuxGcc43/mplibHPMPI b/wmake/rules/linuxGcc43/mplibHPMPI
deleted file mode 100644
index 8aff40632bd23af9607d63c4eb675a8de0cd287c..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc43/mplibHPMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
-PLIBS      = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi
diff --git a/wmake/rules/linuxGcc44/c b/wmake/rules/linuxGcc44/c
deleted file mode 100644
index d914fcd37d084b82a1833722d6ad7a0db3dd1c93..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/c
+++ /dev/null
@@ -1,16 +0,0 @@
-.SUFFIXES: .c .h
-
-cWARN        = -Wall
-
-cc          = gcc -m32
-
-include $(RULES)/c$(WM_COMPILE_OPTION)
-
-cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
-
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
-
-LINK_LIBS   = $(cDBUG)
-
-LINKLIBSO   = $(cc) -shared
-LINKEXE     = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
diff --git a/wmake/rules/linuxGcc44/c++ b/wmake/rules/linuxGcc44/c++
deleted file mode 100644
index e862181fc5c293e1dc6b46f06acad3b72522eb41..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/c++
+++ /dev/null
@@ -1,21 +0,0 @@
-.SUFFIXES: .C .cxx .cc .cpp
-
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
-
-CC          = g++ -m32
-
-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
-
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
-cxxtoo      = $(Ctoo)
-cctoo       = $(Ctoo)
-cpptoo      = $(Ctoo)
-
-LINK_LIBS   = $(c++DBUG)
-
-LINKLIBSO   = $(CC) $(c++FLAGS) -shared
-LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed
diff --git a/wmake/rules/linuxGcc44/c++Debug b/wmake/rules/linuxGcc44/c++Debug
deleted file mode 100644
index 19bdb9c3346fc7a69380dfedd6e7911fe220a965..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/c++Debug
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -ggdb3 -DFULLDEBUG
-c++OPT      = -O0 -fdefault-inline
diff --git a/wmake/rules/linuxGcc44/c++Opt b/wmake/rules/linuxGcc44/c++Opt
deleted file mode 100644
index 2aedabd6280a3476bc58db13139a0a3aa579502b..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/c++Opt
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG     =
-c++OPT      = -O3
diff --git a/wmake/rules/linuxGcc44/c++Prof b/wmake/rules/linuxGcc44/c++Prof
deleted file mode 100644
index 3bda4dad55e898a8198f6e8bfe21e8d829d7230a..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/c++Prof
+++ /dev/null
@@ -1,2 +0,0 @@
-c++DBUG    = -pg
-c++OPT     = -O2
diff --git a/wmake/rules/linuxGcc44/cDebug b/wmake/rules/linuxGcc44/cDebug
deleted file mode 100644
index 72b638f458220e329d52b59e3566a3c807101f9d..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/cDebug
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -ggdb -DFULLDEBUG
-cOPT        = -O1 -fdefault-inline -finline-functions
diff --git a/wmake/rules/linuxGcc44/cOpt b/wmake/rules/linuxGcc44/cOpt
deleted file mode 100644
index 17318709f1fa39e6bf89cbe87778bc6fa459de17..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/cOpt
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       =
-cOPT        = -O3
diff --git a/wmake/rules/linuxGcc44/cProf b/wmake/rules/linuxGcc44/cProf
deleted file mode 100644
index ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/cProf
+++ /dev/null
@@ -1,2 +0,0 @@
-cDBUG       = -pg
-cOPT        = -O2
diff --git a/wmake/rules/linuxGcc44/general b/wmake/rules/linuxGcc44/general
deleted file mode 100644
index fa1eb5b925f5d6e3a87ea2bba97f2163aaa42558..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/general
+++ /dev/null
@@ -1,9 +0,0 @@
-CPP        = cpp -traditional-cpp $(GFLAGS)
-LD         = ld -melf_i386
-
-PROJECT_LIBS = -l$(WM_PROJECT) -ldl
-
-include $(GENERAL_RULES)/standard
-
-include $(RULES)/c
-include $(RULES)/c++
diff --git a/wmake/rules/linuxGcc44/mplibHPMPI b/wmake/rules/linuxGcc44/mplibHPMPI
deleted file mode 100644
index 8aff40632bd23af9607d63c4eb675a8de0cd287c..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc44/mplibHPMPI
+++ /dev/null
@@ -1,3 +0,0 @@
-PFLAGS     =
-PINC       = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
-PLIBS      = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi
diff --git a/wmake/rules/linuxGcc45/c b/wmake/rules/linuxGcc45/c
index d914fcd37d084b82a1833722d6ad7a0db3dd1c93..81c64cf710b3122b58e483154db6e852977d0c9b 100644
--- a/wmake/rules/linuxGcc45/c
+++ b/wmake/rules/linuxGcc45/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxGcc45/c++ b/wmake/rules/linuxGcc45/c++
index 357f4106e10d7d1108a6713802e6f0d01cd8be9a..b00d78f9848f52d3a3e213b6a0b1d757e8bddd2e 100644
--- a/wmake/rules/linuxGcc45/c++
+++ b/wmake/rules/linuxGcc45/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m32
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxGcc46/c b/wmake/rules/linuxGcc46/c
index d914fcd37d084b82a1833722d6ad7a0db3dd1c93..81c64cf710b3122b58e483154db6e852977d0c9b 100644
--- a/wmake/rules/linuxGcc46/c
+++ b/wmake/rules/linuxGcc46/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxGcc46/c++ b/wmake/rules/linuxGcc46/c++
index 357f4106e10d7d1108a6713802e6f0d01cd8be9a..b00d78f9848f52d3a3e213b6a0b1d757e8bddd2e 100644
--- a/wmake/rules/linuxGcc46/c++
+++ b/wmake/rules/linuxGcc46/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m32
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxGcc47/c b/wmake/rules/linuxGcc47/c
index d914fcd37d084b82a1833722d6ad7a0db3dd1c93..81c64cf710b3122b58e483154db6e852977d0c9b 100644
--- a/wmake/rules/linuxGcc47/c
+++ b/wmake/rules/linuxGcc47/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxGcc47/c++ b/wmake/rules/linuxGcc47/c++
index 357f4106e10d7d1108a6713802e6f0d01cd8be9a..b00d78f9848f52d3a3e213b6a0b1d757e8bddd2e 100644
--- a/wmake/rules/linuxGcc47/c++
+++ b/wmake/rules/linuxGcc47/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m32
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxGcc48/c b/wmake/rules/linuxGcc48/c
index d914fcd37d084b82a1833722d6ad7a0db3dd1c93..81c64cf710b3122b58e483154db6e852977d0c9b 100644
--- a/wmake/rules/linuxGcc48/c
+++ b/wmake/rules/linuxGcc48/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxGcc48/c++ b/wmake/rules/linuxGcc48/c++
index 357f4106e10d7d1108a6713802e6f0d01cd8be9a..b00d78f9848f52d3a3e213b6a0b1d757e8bddd2e 100644
--- a/wmake/rules/linuxGcc48/c++
+++ b/wmake/rules/linuxGcc48/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m32
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxGcc49/c b/wmake/rules/linuxGcc49/c
index d914fcd37d084b82a1833722d6ad7a0db3dd1c93..81c64cf710b3122b58e483154db6e852977d0c9b 100644
--- a/wmake/rules/linuxGcc49/c
+++ b/wmake/rules/linuxGcc49/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxGcc49/c++ b/wmake/rules/linuxGcc49/c++
index 357f4106e10d7d1108a6713802e6f0d01cd8be9a..b00d78f9848f52d3a3e213b6a0b1d757e8bddd2e 100644
--- a/wmake/rules/linuxGcc49/c++
+++ b/wmake/rules/linuxGcc49/c++
@@ -1,6 +1,9 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof
+
+# Suppress CGAL warnings
+c++CGALWARN = -Wall -Wextra -Wno-unused-parameter -Wno-old-style-cast -Wnon-virtual-dtor
 
 CC          = g++ -m32
 
@@ -10,7 +13,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxIA64Gcc/c b/wmake/rules/linuxIA64Gcc/c
index 5be3206f843bba17a0e86f7a1c1b60093fc882be..d7bda5d1df864e2a703994bbe92d51586f9da7be 100644
--- a/wmake/rules/linuxIA64Gcc/c
+++ b/wmake/rules/linuxIA64Gcc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxIA64Gcc/c++ b/wmake/rules/linuxIA64Gcc/c++
index b258455b2c82dcdc22955c761d6513fe9ab3f3bf..1d60843b704b94e204a517e304885cbbb283712c 100644
--- a/wmake/rules/linuxIA64Gcc/c++
+++ b/wmake/rules/linuxIA64Gcc/c++
@@ -1,6 +1,6 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wno-invalid-offsetof
 
 CC          = g++
 
@@ -10,7 +10,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxIA64Icc/c b/wmake/rules/linuxIA64Icc/c
index d05b14867e4e22eb7ab922b55da28eda31eea333..3952de58fbdbd9c4549f58bd27e2eef987203705 100644
--- a/wmake/rules/linuxIA64Icc/c
+++ b/wmake/rules/linuxIA64Icc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        =
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG) -L$(IA32ROOT)/lib
 
diff --git a/wmake/rules/linuxIA64Icc/c++ b/wmake/rules/linuxIA64Icc/c++
index 600e980b8b7e43937fa86aa8cf19ce96fee07f58..646e6c0dca81323d97447a31db772edc08a9750c 100644
--- a/wmake/rules/linuxIA64Icc/c++
+++ b/wmake/rules/linuxIA64Icc/c++
@@ -1,4 +1,4 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
 c++WARN     = -wd327,525,654,819,1125,1476,1505,1572
 
@@ -10,7 +10,7 @@ ptFLAGS     = -DNoRepository
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxIcc/c b/wmake/rules/linuxIcc/c
index e8059d9dbb79c4081d103a53d3233efc01f93ee0..a6441bcbd065f2eb2157f93cf86747f69942b507 100644
--- a/wmake/rules/linuxIcc/c
+++ b/wmake/rules/linuxIcc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        =
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -KPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG) -L$(IA32ROOT)/lib
 
diff --git a/wmake/rules/linuxIcc/c++ b/wmake/rules/linuxIcc/c++
index 314cd3cd12d722c40b22368e5c3f8f3b4ba25217..419d41682bab2f8b054adbf85aeabaaff6c8953f 100644
--- a/wmake/rules/linuxIcc/c++
+++ b/wmake/rules/linuxIcc/c++
@@ -1,4 +1,4 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
 c++WARN     = -wd327,525,654,819,1125,1476,1505,1572
 
@@ -11,7 +11,7 @@ ptFLAGS     = -DNoRepository
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -KPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/linuxPPC64Gcc/c b/wmake/rules/linuxPPC64Gcc/c
index 1269da8e333521b85aebec7c45b81ffda1378eaf..1fa057876c161f859ab006e6b7decbc67bfe6bbc 100644
--- a/wmake/rules/linuxPPC64Gcc/c
+++ b/wmake/rules/linuxPPC64Gcc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linuxPPC64Gcc/c++ b/wmake/rules/linuxPPC64Gcc/c++
index b8e735a5bcd9e530005765564337c37292562aeb..809364deb78056f94621efec6f987e0fe88fa618 100644
--- a/wmake/rules/linuxPPC64Gcc/c++
+++ b/wmake/rules/linuxPPC64Gcc/c++
@@ -1,6 +1,6 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wno-invalid-offsetof
 
 CC          = g++ -m64 -mcpu=power5+
 
@@ -10,7 +10,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/SunOS64Gcc/X b/wmake/rules/solaris64Gcc/X
similarity index 100%
rename from wmake/rules/SunOS64Gcc/X
rename to wmake/rules/solaris64Gcc/X
diff --git a/wmake/rules/linux64Gcc43/c b/wmake/rules/solaris64Gcc/c
similarity index 77%
rename from wmake/rules/linux64Gcc43/c
rename to wmake/rules/solaris64Gcc/c
index f4114be3143d1210ffea500a2b361008910abed0..66435ccf057a04d5051164eb65f110c6eb476c6b 100644
--- a/wmake/rules/linux64Gcc43/c
+++ b/wmake/rules/solaris64Gcc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/linux64Gcc43/c++ b/wmake/rules/solaris64Gcc/c++
similarity index 82%
rename from wmake/rules/linux64Gcc43/c++
rename to wmake/rules/solaris64Gcc/c++
index 3ca193e296dc3a739a5eac704b9c442fcb1d1fcb..33cdad290dea93210eb570ca96e1d53b77859d53 100644
--- a/wmake/rules/linux64Gcc43/c++
+++ b/wmake/rules/solaris64Gcc/c++
@@ -1,6 +1,6 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wno-invalid-offsetof
 
 CC          = g++ -m64
 
@@ -10,7 +10,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/rules/SunOS64Gcc/c++Debug b/wmake/rules/solaris64Gcc/c++Debug
similarity index 100%
rename from wmake/rules/SunOS64Gcc/c++Debug
rename to wmake/rules/solaris64Gcc/c++Debug
diff --git a/wmake/rules/SunOS64Gcc/c++Opt b/wmake/rules/solaris64Gcc/c++Opt
similarity index 100%
rename from wmake/rules/SunOS64Gcc/c++Opt
rename to wmake/rules/solaris64Gcc/c++Opt
diff --git a/wmake/rules/SunOS64Gcc/c++Prof b/wmake/rules/solaris64Gcc/c++Prof
similarity index 100%
rename from wmake/rules/SunOS64Gcc/c++Prof
rename to wmake/rules/solaris64Gcc/c++Prof
diff --git a/wmake/rules/SunOS64Gcc/cDebug b/wmake/rules/solaris64Gcc/cDebug
similarity index 100%
rename from wmake/rules/SunOS64Gcc/cDebug
rename to wmake/rules/solaris64Gcc/cDebug
diff --git a/wmake/rules/SunOS64Gcc/cOpt b/wmake/rules/solaris64Gcc/cOpt
similarity index 100%
rename from wmake/rules/SunOS64Gcc/cOpt
rename to wmake/rules/solaris64Gcc/cOpt
diff --git a/wmake/rules/SunOS64Gcc/cProf b/wmake/rules/solaris64Gcc/cProf
similarity index 100%
rename from wmake/rules/SunOS64Gcc/cProf
rename to wmake/rules/solaris64Gcc/cProf
diff --git a/wmake/rules/SunOS64Gcc/general b/wmake/rules/solaris64Gcc/general
similarity index 100%
rename from wmake/rules/SunOS64Gcc/general
rename to wmake/rules/solaris64Gcc/general
diff --git a/wmake/rules/SunOS64Gcc/mplibFJMPI b/wmake/rules/solaris64Gcc/mplibFJMPI
similarity index 100%
rename from wmake/rules/SunOS64Gcc/mplibFJMPI
rename to wmake/rules/solaris64Gcc/mplibFJMPI
diff --git a/wmake/rules/solarisGcc/c b/wmake/rules/solarisGcc/c
index 5be3206f843bba17a0e86f7a1c1b60093fc882be..d7bda5d1df864e2a703994bbe92d51586f9da7be 100644
--- a/wmake/rules/solarisGcc/c
+++ b/wmake/rules/solarisGcc/c
@@ -1,4 +1,4 @@
-.SUFFIXES: .c .h
+SUFFIXES += .c
 
 cWARN        = -Wall
 
@@ -8,7 +8,7 @@ include $(RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
-ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
+ctoo        = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
 
 LINK_LIBS   = $(cDBUG)
 
diff --git a/wmake/rules/solarisGcc/c++ b/wmake/rules/solarisGcc/c++
index 667b00c89457e69eaffda05da2e9954175e846d9..4cb29df20f2fd623015dff215a86768a61b58fc4 100644
--- a/wmake/rules/solarisGcc/c++
+++ b/wmake/rules/solarisGcc/c++
@@ -1,6 +1,6 @@
-.SUFFIXES: .C .cxx .cc .cpp
+SUFFIXES += .C
 
-c++WARN     = -Wall -Wextra -Wno-unused-parameter
+c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wno-invalid-offsetof
 
 CC          = g++
 
@@ -10,7 +10,7 @@ ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
 c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
 
-Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
+Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
 cxxtoo      = $(Ctoo)
 cctoo       = $(Ctoo)
 cpptoo      = $(Ctoo)
diff --git a/wmake/scripts/AllwmakeParseArguments b/wmake/scripts/AllwmakeParseArguments
new file mode 100644
index 0000000000000000000000000000000000000000..dd788dd77fd57dca0b3b79fd2d2a3ea19be6774e
--- /dev/null
+++ b/wmake/scripts/AllwmakeParseArguments
@@ -0,0 +1,154 @@
+#----------------------------------*-sh-*--------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# File
+#     wmake/scripts/AllwmakeParseArguments
+#
+# Description
+#     Allwmake argument parser
+#
+# Usage
+#     # Declare the targetType and set to default for library building
+#     targetType=libso      # lib, libo or libso
+#
+#     # Declare genDoc and set to default if documentation building is supported
+#     genDoc=0              # 0 or 1
+#
+#     # Parse the arguments by sourcing this script
+#     . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+#
+#------------------------------------------------------------------------------
+Script=${0##*/}
+
+usage() {
+    exec 1>&2
+    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
+
+    # Print normal usage options
+    cat<<USAGE
+
+Usage: $Script [OPTIONS]
+
+options:
+  -h or -help       Print list of Allwmake options
+  -k or -non-stop   Compile without stopping when errors occur
+  -j                Compile using all local cores/hyperthreads
+  -jN or -j N       Compile using N cores/hyperthreads
+  -no-scheduler     Compile without wmakeScheduler
+USAGE
+
+    # Print options for building code documentation
+    test -n "$genDoc" && cat<<USAGE_DOC
+  doc               Compile code documentation (requires Doxygen)
+USAGE_DOC
+
+    # Print options for building libraries
+    test -n "$targetType" && cat<<USAGE_LIB
+  lib               Compile statically linked archive lib (.a)
+  libo              Compile statically linked lib (.o)
+  libso             Compile dynamically linked lib (.so)
+  dep               Compile dependency files
+USAGE_LIB
+
+    exit 1
+}
+
+
+#------------------------------------------------------------------------------
+# Set WM_NCOMPPROCS to number of cores on local machine
+#------------------------------------------------------------------------------
+
+setWM_NCOMPPROCS()
+{
+    if [ -r /proc/cpuinfo ]
+    then
+        WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
+    else
+        WM_NCOMPPROCS=1
+    fi
+
+    export WM_NCOMPPROCS
+}
+
+
+#------------------------------------------------------------------------------
+# Parse the arguments and options
+#------------------------------------------------------------------------------
+
+while [ "$#" -gt 0 ]
+do
+    case "$1" in
+        # Print help
+        -h | -help)
+            usage
+            ;;
+        # Parallel compilation on all cores of local machine
+        -j)
+            setWM_NCOMPPROCS
+            test $# -ge 2 && expr $2 + 1 > /dev/null 2>&1 \
+                && shift && export WM_NCOMPPROCS=$1
+            echo "Compiling enabled on $WM_NCOMPPROCS cores"
+            ;;
+        # Parallel compilation on specified number of cores
+        -j*)
+            export WM_NCOMPPROCS=${1#-j}
+            echo "Compiling enabled on $WM_NCOMPPROCS cores"
+            ;;
+        # Non-stop compilatio, ignoring errors
+        -k | -non-stop)
+            export WM_CONTINUE_ON_ERROR=1
+            ;;
+        # Disable scheduled parallel compilation
+        -no-scheduler)
+            unset WM_SCHEDULER
+            ;;
+        # Generate documentation
+        doc)
+            test -n "$genDoc" || usage "invalid option '$1'"
+            genDoc=1
+            ;;
+        # Specify target type
+        lib | libo | libso | dep)
+            test -n "$targetType" || usage "invalid option '$1'"
+            targetType=$1
+            ;;
+        --)
+            shift
+            break
+            ;;
+        -* | *)
+            usage "invalid option '$1'"
+            ;;
+    esac
+    shift
+done
+
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script usage setWM_NCOMPPROCS
+
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/wmake/scripts/addCompile b/wmake/scripts/addCompile
deleted file mode 100755
index 63a5b2622d61a7def8dd1f697ca3998b6b473e1d..0000000000000000000000000000000000000000
--- a/wmake/scripts/addCompile
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-#    \\/     M anipulation  |
-#------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software: you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by
-#     the Free Software Foundation, either version 3 of the License, or
-#     (at your option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Script
-#     addCompile
-#
-# Description
-#     Cleans up the dependency list and add the compilation statement.
-#
-#     Usage: wmkdep <fileName> | addCompile <fileName>
-#
-#------------------------------------------------------------------------------
-
-sourceName=${1##*/}
-objectName=${sourceName%.*}.o
-className=${sourceName%.*}.class
-sub=${1##*.}
-depName=${1%.*}.dep
-
-sourceDir=${1%/*}
-
-if [ "$sourceDir" = "$sourceName" ]
-then
-    sourceDir=.
-fi
-
-if [ "$WM_PROJECT_DIR" ]
-then
-    sed -e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'% > $depName
-else
-    cat > $depName
-fi
-
-sed -e s%".*.o.*:"%'$(OBJECTS_DIR)/'"$objectName\:"%  \
-    -e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'%         \
-    >> $depName
-
-echo '$(OBJECTS_DIR)/'$objectName': $(EXE_DEP)' >> $depName
-echo '$(OBJECTS_DIR)/'$objectName':' >> $depName
-echo '	@SOURCE_DIR='$sourceDir >> $depName
-echo '	SOURCE='$1' ; $('$sub'too)' >> $depName
-
-#------------------------------------------------------------------------------
diff --git a/wmake/scripts/makeDerivedFiles b/wmake/scripts/makeDerivedFiles
deleted file mode 100755
index 28eaf89fee96a868b06e1c5e2cd307f3a521d89f..0000000000000000000000000000000000000000
--- a/wmake/scripts/makeDerivedFiles
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-#    \\/     M anipulation  |
-#-------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software: you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by
-#     the Free Software Foundation, either version 3 of the License, or
-#     (at your option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Script
-#     makeDerivedFiles
-#
-# Description
-#     Constructs all the file list for make given the source file list,
-#     written by hand or using makeFilesAndOptions.
-#
-#------------------------------------------------------------------------------
-
-[ -d "$WM_OPTIONS" ] || {
-    echo "The '$WM_OPTIONS' directory does not exist, exiting" 1>&2
-    exit 1
-}
-
-# change to the $WM_OPTIONS directory
-cd "$WM_OPTIONS" 2>/dev/null || {
-    echo "Could not change to directory '$WM_OPTIONS'" 1>&2
-    exit 1
-}
-
-# Find and keep macro definitions in files list
-grep "=" files > filesMacros
-
-# Remove all macro definitions from the files list
-grep -v "=" files > filesPlusBlank
-
-# Add a newline to files to ensure the last line is followed by a newline
-echo "" >> filesPlusBlank
-
-
-# Remove commented lines, blank lines, and trailing blanks from files
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-sed -e '/^#/ d'         \
-    -e '/^[ \t]*$/ d'   \
-    -e 's/[ \t]*$//'    \
-    filesPlusBlank > files.$$
-
-rm filesPlusBlank
-
-
-# make sourceFiles
-# ~~~~~~~~~~~~~~~~
-echo "SOURCE = " > tmpSourceFile
-cat files.$$ >> tmpSourceFile
-
-sed -e 's/$/\\/'    \
-    -e '$s/\\//'    \
-    tmpSourceFile > sourceFiles
-
-rm tmpSourceFile
-
-
-# make objectFiles
-# ~~~~~~~~~~~~~~~~
-sed -e 's%.*/%%'               \
-    -e 's%^%$(OBJECTS_DIR)/%'  \
-    -e 's%\.[a-zA-Z]*$%\.o%'   \
-    files.$$ > tmpObjectFiles
-
-echo "OBJECTS = " > tmpObjectFiles2
-cat tmpObjectFiles >> tmpObjectFiles2
-
-sed -e 's/$/\\/'    \
-    -e '$s/\\//'    \
-    tmpObjectFiles2 > objectFiles
-
-rm tmpObjectFiles tmpObjectFiles2
-
-
-# make localObjectFiles
-# ~~~~~~~~~~~~~~~~~~~~~
-sed -e 's%.*/%%'               \
-    -e 's%\.[a-zA-Z]*$%\.o%'   \
-    files.$$ > tmpLocalObjectFiles
-
-echo "LOCAL_OBJECTS = " > tmpLocalObjectFiles2
-cat tmpLocalObjectFiles >> tmpLocalObjectFiles2
-
-sed -e 's/$/\\/'    \
-    -e '$s/\\//'    \
-    tmpLocalObjectFiles2 > localObjectFiles
-
-rm tmpLocalObjectFiles tmpLocalObjectFiles2
-
-
-# make dependencyFiles
-# ~~~~~~~~~~~~~~~~~~~~
-sed 's/\.[a-zA-Z]*$/\.dep/' \
-     files.$$ > tmpDependencyFiles
-
-echo "DEPENDENCIES = " > tmpDependencyFiles2
-cat tmpDependencyFiles >> tmpDependencyFiles2
-
-sed -e 's/$/\\/'    \
-    -e '$s/\\//'    \
-    tmpDependencyFiles2 > dependencyFiles
-
-rm tmpDependencyFiles tmpDependencyFiles2
-
-
-# make includeDeps
-# ~~~~~~~~~~~~~~~~
-sed -e 's/\.[a-zA-Z]*$/.dep/'   \
-    -e 's/^/include /'          \
-    files.$$ > includeDeps
-
-rm files.$$
-
-#------------------------------------------------------------------------------
diff --git a/wmake/scripts/makeDir b/wmake/scripts/makeDir
deleted file mode 100755
index 19ab86b7dedf713b201809744d51cf2b3f4bd74f..0000000000000000000000000000000000000000
--- a/wmake/scripts/makeDir
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-#    \\/     M anipulation  |
-#-------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software: you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by
-#     the Free Software Foundation, either version 3 of the License, or
-#     (at your option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Script
-#     makeDir
-#
-# Description
-#     Script to make directories that do not already exist
-#     Usage : makeDir <dir> [.. <dirN>]
-#
-#------------------------------------------------------------------------------
-
-for dir
-do
-    [ -d "$dir" ] || mkdir -p "$dir"
-done
-
-
-#------------------------------------------------------------------------------
diff --git a/wmake/src/Makefile b/wmake/src/Makefile
index 328f3e53a0de0291a563bd9412f7f41c61c7869c..07b2d43562485724a6eda471bd8fd517c22625ac 100644
--- a/wmake/src/Makefile
+++ b/wmake/src/Makefile
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -36,11 +36,10 @@
 SHELL      = /bin/sh
 
 #------------------------------------------------------------------------------
-# Initialise suffices list
+# Unset suffices list (suffix rules are not used)
 #------------------------------------------------------------------------------
 
 .SUFFIXES:
-.SUFFIXES: .o
 
 
 #------------------------------------------------------------------------------
diff --git a/wmake/src/makeParserCode b/wmake/src/makeParserCode
index 161d5af41bcf82a8c015827c4b6be80a1ff35c38..1ddf1576a40e669c206b052c4fb705edd4af6b16 100755
--- a/wmake/src/makeParserCode
+++ b/wmake/src/makeParserCode
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -29,24 +29,25 @@
 #     Use coco-cpp to create parser code
 #
 #------------------------------------------------------------------------------
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
+Script=${0##*/}
 
-bindir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/coco-cpp/bin
-frames=$bindir/../share/coco-cpp
+binDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/coco-cpp/bin
+frames=$binDir/../share/coco-cpp
 
-[ -d "$bindir" -a -x "$bindir/coco-cpp" ] || {
-    echo "no coco-cpp binary found"
+[ -d "$binDir" -a -x "$binDir/coco-cpp" ] || {
+    echo "$Script error: no coco-cpp binary found"
     exit 1
 }
 
 [ -d "$frames" -a -f "$frames/Parser.frame" -a -f "$frames/Scanner.frame" ] || {
-    echo "no coco-cpp frames found"
+    echo "$Script error: no coco-cpp frames found"
     exit 1
 }
 
-# run coco-cpp:
-$bindir/coco-cpp wmkdependParser.atg
+# Run coco-cpp:
+$binDir/coco-cpp wmkdependParser.atg
 
 echo
 echo Done
diff --git a/wmake/src/wmkdep.l b/wmake/src/wmkdep.l
index 3b6973209b562be4e06b7d7aa6296baa5fa501b5..c9e1d8e67d629ba55d63249ac4b913966f76562a 100644
--- a/wmake/src/wmkdep.l
+++ b/wmake/src/wmkdep.l
@@ -3,7 +3,7 @@
  =========                   |
  \\      /   F ield          | OpenFOAM: The Open Source CFD Toolbox
   \\    /    O peration      |
-   \\  /     A nd            | Copyright (C) 2011-2013 OpenFOAM Foundation
+   \\  /     A nd            | Copyright (C) 2011-2014 OpenFOAM Foundation
     \\/      M anipulation   |
 ------------------------------------------------------------------------------
 License
@@ -68,16 +68,6 @@ void importDir(const char* dirName);
 ^[ \t]*#[ \t]*include[ \t]+\"   BEGIN(CFNAME);  /* c-file name */
 <CFNAME>[^"\n ]*        { BEGIN(INITIAL); nextFile(yytext); } /*"*/
 
-^[ \t]*import[ \t]+       BEGIN(JFNAME);  /* java-file name */
-<JFNAME>java.*;           BEGIN(INITIAL);
-<JFNAME>org.*;            BEGIN(INITIAL);
-<JFNAME>com.*;            BEGIN(INITIAL);
-<JFNAME>sunw.*;           BEGIN(INITIAL);
-<JFNAME>sun.*;            BEGIN(INITIAL);
-<JFNAME>launcher.*;       BEGIN(INITIAL);
-<JFNAME>[^"\n*]*;       { BEGIN(INITIAL); importFile(yytext); } /*"*/
-<JFNAME>[^"\n]*\*;      { BEGIN(INITIAL); importDir(yytext); } /*"*/
-
 "      "include[ \t]+\'   BEGIN(FFNAME);  /* FORTRAN-file name */
 <FFNAME>[^']*           { BEGIN(INITIAL); nextFile(yytext); } /*'*/
 
@@ -134,7 +124,6 @@ int lookUp(struct HashEntry** hashTable, const char* p)
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-
 int nDirectories = 0;
 char** directories;
 char* sourceFile = NULL;
@@ -143,10 +132,6 @@ char* depFile = NULL;
 /* Set of files already visited */
 struct HashEntry* visitedFiles[HASH_TABLE_SIZE];
 
-/* Set of (java) directories already visited */
-struct HashEntry* visitedDirs[HASH_TABLE_SIZE];
-
-
 int main(int argc, char* argv[])
 {
     char *basePos, *dotPos;
@@ -226,31 +211,23 @@ int main(int argc, char* argv[])
      * because there is a bug in the SGI strncat that if 0 preceeds the '.'
      * it inserts a space
      */
-    depFile = (char*)malloc(strlen(sourceFile) + 3);
+    depFile = (char*)malloc(strlen(sourceFile) + 20);
     depFile[0] = 0;
-    strncat(depFile, sourceFile, (dotPos - sourceFile)/sizeof(char));
+    strcat(depFile, "$(OBJECTS_DIR)/");
+    strcat(depFile, sourceFile);
     strcat(depFile, ".dep");
 
-    if (strcmp(dotPos, ".java") == 0)
-    {
-        char *classFile = strdup(sourceFile);
-        classFile[(dotPos - sourceFile)/sizeof(char)] = 0;
+    char *objectFile = strdup(basePos);
+    objectFile[(dotPos - basePos)/sizeof(char)] = 0;
 
-        printf("$(CLASSES_DIR)/%s.class: %s\n", classFile, depFile);
-        free(classFile);
-    }
-    else
-    {
-        char *objectFile = strdup(basePos);
-        objectFile[(dotPos - basePos)/sizeof(char)] = 0;
-
-        printf("$(OBJECTS_DIR)/%s.o: %s\n", objectFile, depFile);
-        free(objectFile);
-    }
+    /* printf("$(OBJECTS_DIR)/%s.o: %s\n", objectFile, depFile); */
+    printf("%s: \\\n", depFile);
+    free(objectFile);
 
     nextFile(sourceFile);
     yylex();
 
+    puts("\n");
 
     for (i = 0; i < nDirectories; i++)
     {
@@ -322,7 +299,7 @@ void nextFile(const char* fileName)
 
             if ((newyyin = fopen(pathName, "r")))
             {
-                printf("%s: %s\n", depFile, pathName);
+                printf("%s \\\n", pathName);
                 buffers[currentBuffer++] = YY_CURRENT_BUFFER;
                 yy_switch_to_buffer(yy_create_buffer(newyyin, YY_BUF_SIZE));
 
@@ -361,7 +338,7 @@ void nextFile(const char* fileName)
     }
     else
     {
-        printf("%s: %s\n", depFile, fileName);
+        printf("%s \\\n", fileName);
         fflush(stdout);
 
         buffers[currentBuffer++] = YY_CURRENT_BUFFER;
@@ -385,77 +362,6 @@ void dotToSlash(char* fileName)
 }
 
 
-/*
- * Import (java) file
- */
-void importFile(const char* fileName)
-{
-    char* javaFileName;
-    int fileNameLen;
-
-    fileNameLen = strlen(fileName);
-    javaFileName = (char*)malloc(fileNameLen + 6);
-    javaFileName[0] = 0;
-    strncat(javaFileName, fileName, fileNameLen - 1);
-    dotToSlash(javaFileName);
-    strcat(javaFileName, ".java");
-
-    nextFile(javaFileName);
-
-    free(javaFileName);
-}
-
-
-/*
- * Import (java) directories
- */
-void importDir(const char* dirName)
-{
-    char *uDirName;
-    DIR *source;
-
-    if (lookUp(visitedDirs, dirName))
-    {
-        return;   /* already existed (did not insert) */
-    }
-
-    uDirName = strdup(dirName);
-    dotToSlash(uDirName);
-
-    uDirName[strlen(dirName)-2] = 0;
-
-    if ((source = opendir(uDirName)) == NULL)
-    {
-        fprintf
-        (
-            stderr,
-            "could not open directory %s\n",
-            uDirName
-        );
-    }
-    else
-    {
-        /* Read and parse all the entries in the directory */
-        struct dirent *list;
-
-        while ((list = readdir(source)) != NULL)
-        {
-            char* dotPos = strrchr(list->d_name, '.');
-
-            if (dotPos != NULL && strcmp(dotPos, ".java") == 0)
-            {
-                char* pathName = addDirectoryName(uDirName, list->d_name);
-                nextFile(pathName);
-                free(pathName);
-            }
-        }
-
-        closedir(source);
-    }
-    free(uDirName);
-}
-
-
 /*
  * The lexer calls yywrap to handle EOF conditions
  */
diff --git a/wmake/wclean b/wmake/wclean
index 2427511f2f82d4ad124fd7e3ffe416c73a18cffb..28e2621bccbc2f8f8a79d4faca103374f49fd298 100755
--- a/wmake/wclean
+++ b/wmake/wclean
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -57,7 +57,10 @@ USAGE
 }
 
 
-# parse options
+#------------------------------------------------------------------------------
+# Parse arguments and options
+#------------------------------------------------------------------------------
+
 while [ "$#" -gt 0 ]
 do
     case "$1" in
@@ -81,7 +84,7 @@ done
 # check arguments and change to the directory in which to run wclean
 #------------------------------------------------------------------------------
 
-unset dir makeType
+unset dir targetType
 MakeDir=Make
 
 if [ $# -ge 1 ]
@@ -91,7 +94,7 @@ then
     then
         dir=$1
     else
-        makeType=$1
+        targetType=$1
     fi
 
     # specified directory name:
@@ -112,11 +115,12 @@ then
     echo "$Script ${dir:-./}"
 fi
 
+
 #------------------------------------------------------------------------------
 # Recurse the directories tree
 #------------------------------------------------------------------------------
 
-if [ "$makeType" = all ]
+if [ "$targetType" = all ]
 then
     if [ -e Allwclean ]       # consistent with Allwmake
     then
@@ -126,40 +130,51 @@ then
     then
         ./Allclean
         exit $?
-    elif [ ! -d $MakeDir ]
-    then
+    else
+        # For all the sub-directories containing a 'Make' directory
         for dir in `find . \( -type d -a -name Make \)`
         do
+            echo $dir
             $0 ${dir%/Make}   # parent directory - trim /Make from the end
         done
-        exit 0
     fi
 fi
 
-# makeType is not needed beyond this point
-unset makeType
+# targetType is not needed beyond this point
+unset targetType
 
 
 #------------------------------------------------------------------------------
-# Require the existence of the 'Make' directory
+# Clean the 'Make' directory if present
 #------------------------------------------------------------------------------
 
-[ -d $MakeDir ] || {
-    echo "$Script error: '$MakeDir' directory does not exist" 1>&2
-    exit 1
-}
+if [ -d $MakeDir ]
+then
+    objectsDir=$MakeDir/$WM_OPTIONS
+    if echo $PWD | grep "$WM_PROJECT_DIR"
+    then
+        platformPath=$WM_PROJECT_DIR/platforms/${WM_OPTIONS}
+        objectsDir=$platformPath$(echo $PWD | sed s%$WM_PROJECT_DIR%% )
+    fi
+    rm -rf $objectsDir 2>/dev/null
+fi
 
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
+# Remove the lnInclude directory if present
+#------------------------------------------------------------------------------
+
+if [ -d lnInclude ]
+then
+    rm -rf lnInclude 2>/dev/null
+fi
 
-rm -rf $MakeDir/$WM_OPTIONS $MakeDir/classes 2>/dev/null
 
-find . -name "*.dep" -exec rm {} \;
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
 
-# always safe to remove lnInclude
-rm -rf lnInclude 2>/dev/null
+unset Script usage
 
-rm -rf ii_files Templates.DB 2>/dev/null
-rm -f so_locations 2>/dev/null
 
 #------------------------------------------------------------------------------
diff --git a/wmake/wcleanAll b/wmake/wcleanAll
index 499b95eb32b99712afef65ba453ee0f8cbb5f351..a136f7704d4b4969e937971032a75b1c43e43b8c 100755
--- a/wmake/wcleanAll
+++ b/wmake/wcleanAll
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -30,19 +30,25 @@
 #     directories of all machines and delete them.
 #
 #------------------------------------------------------------------------------
+Script=${0##*/}
+
 usage() {
     exec 1>&2
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
-usage: ${0##*/}
+Usage: $Script
 
-    Remove all object files and *.dep files
+    Remove all object and related files
 
 USAGE
     exit 1
 }
 
-# parse options
+
+#------------------------------------------------------------------------------
+# Parse arguments and options
+#------------------------------------------------------------------------------
+
 while [ "$#" -gt 0 ]
 do
     case "$1" in
@@ -61,20 +67,25 @@ done
 echo "Removing platforms/ subdirectores"
 rm -rf platforms/*
 
-echo "Removing *.dep files"
-find . -name '*.dep' -exec rm {} \;
-
 echo "Cleaning Make subdirectories"
 find . -depth \( -name Make -o -name "Make.[A-Za-z]*" \) -type d -print | \
     xargs -i find '{}' -mindepth 1 -maxdepth 1 -type d -print | \
     xargs rm -rf
 
-echo "Removing lnInclude and intermediate directories"
-find . -depth -type d \( -name lnInclude -o -name ii_files -o -name Templates.DB \) -exec rm -rf {} \;
+echo "Removing lnInclude directories"
+find . -depth -type d \( -name lnInclude \) -exec rm -rf {} \;
 
 echo "Removing misc files"
-find . \( -name exe -o -name log -o -name so_locations \) -exec rm {} \;
+find . \( -name exe -o -name log \) -exec rm {} \;
 
 tutorials/Allclean
 
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script usage
+
+
 #------------------------------------------------------------------------------
diff --git a/wmake/wcleanLnIncludeAll b/wmake/wcleanLnIncludeAll
index 06707e8bf6d986fcaa663170e893808a15ca7cc0..09eb1f6861e29fcc1dddaad5861f9eb17371b0b1 100755
--- a/wmake/wcleanLnIncludeAll
+++ b/wmake/wcleanLnIncludeAll
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -29,14 +29,15 @@
 #     Delete all the lnInclude directories in the tree.
 #
 #------------------------------------------------------------------------------
+Script=${0##*/}
 
-# default is pwd
+# Default to the CWD
 if [ "$#" -eq 0 ]
 then
     set -- .
 elif [ "$1" = "-h" -o "$1" = "-help" ]
 then
-    echo "Usage: ${0##*/} [dir1] .. [dirN]"
+    echo "Usage: $Script [dir1] .. [dirN]"
     echo
     echo "    Delete all the lnInclude directories in the tree"
     echo
@@ -44,15 +45,23 @@ then
 fi
 
 
-for i
+for dir
 do
-    if [ -d "$i" ]
+    if [ -d "$dir" ]
     then
-        echo "removing lnInclude directories: $i"
-        find $i -depth -type d -name lnInclude -exec rm -rf {} \;
+        echo "removing lnInclude directories: $dir"
+        find $dir -depth -type d -name lnInclude -exec rm -rf {} \;
     else
-        echo "no directory: $i" 1>&2
+        echo "no directory: $dir" 1>&2
     fi
 done
 
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script
+
+
 #------------------------------------------------------------------------------
diff --git a/wmake/wcleanMachine b/wmake/wcleanMachine
index 7981a55cbd5a0a59018ed6a5a6b990e2acb580d3..1079b734a3f86b2ab03e8f04e3bd464bc968955d 100755
--- a/wmake/wcleanMachine
+++ b/wmake/wcleanMachine
@@ -34,11 +34,13 @@
 #            wcleanMachine <machineType> [ .. <machineTypeN> ]
 #
 #------------------------------------------------------------------------------
+Script=${0##*/}
+
 usage() {
     exec 1>&2
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
-Usage: ${0##*/} machineType [... machineTypeN] [ -current ]
+Usage: $Script machineType [... machineTypeN] [ -current ]
 
   Searches the directory tree starting at the current directory for the
   object file directories of the specified machine type(s) and deletes them.
@@ -85,4 +87,12 @@ do
 
 done
 
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script machines
+
+
 #------------------------------------------------------------------------------
diff --git a/wmake/wdep b/wmake/wdep
new file mode 100755
index 0000000000000000000000000000000000000000..676783da5f2cb012ccb7b54a976bc67bff3562fa
--- /dev/null
+++ b/wmake/wdep
@@ -0,0 +1,159 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#-------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Script
+#     wdep <file>
+#     cat `wdep <file>`
+#
+# Description
+#     Find the dep-file corresponding to <file> and print the path.
+#
+#     Note: wdep MUST be run from the directory containing <file>.
+#     If it proves useful an option could be added to search the local
+#     source-tree for <file> if it is not in the current directory.
+#
+#------------------------------------------------------------------------------
+Script=${0##*/}
+
+usage() {
+    exec 1>&2
+    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
+    cat<<USAGE
+
+Usage: $Script <file>
+
+Find the dep-file corresponding to <file> in the current directory
+and print the path.
+
+USAGE
+    exit 1
+}
+
+
+#------------------------------------------------------------------------------
+# Parse arguments and options
+#------------------------------------------------------------------------------
+
+while [ "$#" -gt 0 ]
+do
+    case "$1" in
+    -h | -help)
+        usage
+        ;;
+    -*)
+        usage "unknown option: '$*'"
+        ;;
+    *)
+        break
+        ;;
+    esac
+done
+
+
+#------------------------------------------------------------------------------
+# Check <file> is is the current directory
+#------------------------------------------------------------------------------
+
+if [ ! -e $1 ]
+then
+    echo "$Script error: source file $1 is not in the current directory" 1>&2
+    exit 1
+fi
+
+
+#------------------------------------------------------------------------------
+# Check environment variables
+#------------------------------------------------------------------------------
+
+for envar in WM_OPTIONS WM_DIR WM_PROJECT_DIR
+do
+    eval test "\$$envar" || {
+        echo "$Script error: environment variable \$$envar not set" 1>&2
+        exit 1
+    }
+done
+
+
+#------------------------------------------------------------------------------
+# Search up directories tree for the Make sub-directory
+#------------------------------------------------------------------------------
+
+expandPath()
+{
+    dir=$(dirname $1)
+    cwd=$PWD
+    cd $dir
+    exPath=$PWD
+    cd $cwd
+}
+
+findTarget()
+{
+    expandPath $1
+
+    if [ "$exPath" = "$WM_PROJECT_DIR" \
+                   -o "$exPath" = "$HOME" \
+                   -o "$exPath" = "/" \
+       ]
+    then
+        echo "$Script error: could not find Make directory" 1>&2
+        exit 1
+    elif [ -d "$1/Make" ]; then
+        dir=$1
+    else
+        findTarget "$1/.."
+    fi
+}
+
+fileName=${1##*/}
+
+expandPath $1
+
+if echo $exPath | grep "$WM_PROJECT_DIR" > /dev/null
+then
+    platformPath=$WM_PROJECT_DIR/platforms/${WM_OPTIONS}
+    objectsDir=$platformPath$(echo $exPath | sed s%$WM_PROJECT_DIR%% )
+else
+    path=$exPath
+    dir=.
+    if [ ! -d Make ]
+    then
+        findTarget .
+    fi
+    appDir=$dir
+    expandPath $appDir/.
+    objectsDir=$appDir/Make/${WM_OPTIONS}$(echo $path | sed s%$exPath%% )
+fi
+
+echo $objectsDir/$fileName.dep
+
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script usage expandPath findTarget
+
+
+#------------------------------------------------------------------------------
diff --git a/wmake/wmake b/wmake/wmake
index 0f8e2cc41f0266271448a807934ffd180e6033b7..5f5ce2ebef33da96aa495d7839e140c691b71ca0 100755
--- a/wmake/wmake
+++ b/wmake/wmake
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -26,7 +26,27 @@
 #     wmake
 #
 # Description
-#     General, easy to use make system for multi-platform development.
+#     General, easy to use make system for multi-platform development
+#     with support for local and network parallel compilation.
+#
+#     This updated wmake supports out-of-tree object and dependency files to
+#     avoid the clutter which accumulates in the source-tree with the original
+#     wmake system.  Now when building the OpenFOAM package both the object and
+#     dependency files are now located in a tree with the same structure as the
+#     source tree but in the platforms/$WM_OPTIONS sub-directory of
+#     $WM_PROJECT_DIR.
+#
+#     When building user libraries and applications which are not located in the
+#     OpenFOAM source-tree the object and dependency files are located in a tree
+#     with the same structure as the source tree but in the Make/$WM_OPTIONS
+#     sub-directory.
+#
+#     The disadvantage of the out-of-tree compilation is that the dependency
+#     files are harder to find but are sometimes useful to study which header
+#     files are included.  For those who need access to the dependency files the
+#     new wdep script is provided to locate them.
+#     See the wdep script header or run:
+#         wdep -h
 #
 #------------------------------------------------------------------------------
 Script=${0##*/}
@@ -40,32 +60,41 @@ Usage: $Script [OPTION] [dir]
        $Script [OPTION] target [dir [MakeDir]]
 
 options:
-  -s | -silent      invoke make in 'silent' mode (do not echo commands)
-  -help             print the usage
+  -s | -silent      Run make in 'silent' mode (do not echo commands)
+  -a | -all         Run wmake in all subdirectories
+  -h | -help        Print the usage
 
 
 A general, easy-to-use make system for multi-platform development
+with support for local and network parallel compilation.
 
 The 'target' is a Makefile target:
-  e.g., Make/linux64GccDPOpt/fvMesh.o
+  e.g., platforms/linux64GccDPOpt/.../fvMesh.o
 
 or a special target:
-  all               all subdirectories, uses any Allwmake files if they exist
-  exe               build statically linked executable
-  lib               build statically linked archive lib (.a)
-  libo              build statically linked lib (.o)
-  libso             build dynamically linked lib (.so)
-  jar               build Java jar
-  dep               build lnInclude and dependencies only
+  all               wmake all subdirectories, running Allwmake files if present
+  exe               Compile statically linked executable
+  lib               Compile statically linked archive lib (.a)
+  libo              Compile statically linked lib (.o)
+  libso             Compile dynamically linked lib (.so)
+  dep               Compile lnInclude and dependencies only
 
 USAGE
     exit 1
 }
 
-# normally use "make"
+
+# Default make is the "make" in the path
 make="make"
 
-# parse options
+
+#------------------------------------------------------------------------------
+# Parse arguments and options
+#------------------------------------------------------------------------------
+
+# Default to compiling the local target only
+all=
+
 while [ "$#" -gt 0 ]
 do
     case "$1" in
@@ -76,6 +105,10 @@ do
         make="$make -s"
         shift
         ;;
+    -a | -all | all)
+        all="all"
+        shift
+        ;;
     -*)
         usage "unknown option: '$*'"
         ;;
@@ -90,30 +123,31 @@ done
 # Check environment variables
 #------------------------------------------------------------------------------
 
-for check in WM_OPTIONS WM_LINK_LANGUAGE WM_DIR
+for envar in WM_OPTIONS WM_LINK_LANGUAGE WM_DIR
 do
-    eval test "\$$check" || {
-        echo "$Script error: environment variable \$$check not set" 1>&2
+    eval test "\$$envar" || {
+        echo "$Script error: environment variable \$$envar not set" 1>&2
         exit 1
     }
 done
 
 
-# when compiling anything but a standalone exe:
-# WM_PROJECT and WM_PROJECT_DIR must be set
+# When compiling anything but a standalone exe WM_PROJECT and WM_PROJECT_DIR
+# must be set
 [ "$1" = exe -o \( "$WM_PROJECT" -a "$WM_PROJECT_DIR" \) ] || {
     echo "$Script error:" 1>&2
-    echo "    environment variable \$WM_PROJECT or \$WM_PROJECT_DIR not set" 1>&2
+    echo "    environment variable \$WM_PROJECT or " \
+         "\$WM_PROJECT_DIR not set" 1>&2
     echo "    while building project library" 1>&2
     exit 1
 }
 
 
 #------------------------------------------------------------------------------
-# Select the version of make use
+# Setup parallel compilation
 #------------------------------------------------------------------------------
 
-# set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
+# Set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
 if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ]
 then
     WM_NCOMPPROCS=$(wmakeScheduler -count)
@@ -142,7 +176,7 @@ fi
 # Check arguments and change to the directory in which to run wmake
 #------------------------------------------------------------------------------
 
-unset dir makeType
+unset dir targetType
 MakeDir=Make
 
 if [ $# -ge 1 ]
@@ -151,13 +185,13 @@ then
     then
         dir=$1
     else
-        makeType=$1
+        targetType=$1
     fi
 
-    # specified directory name:
+    # Specified directory name:
     [ $# -ge 2 ] && dir=$2
 
-    # specified alternative name for the Make sub-directory:
+    # Specified alternative name for the Make sub-directory:
     [ $# -ge 3 ] && MakeDir=$3
 
     if [ "$dir" ]
@@ -171,55 +205,71 @@ fi
 
 
 #------------------------------------------------------------------------------
-# Recurse the application directories tree
+# Recurse the source tree to compile "all" targets
 #------------------------------------------------------------------------------
 
-if [ "$makeType" = all ]
+if [ "$all" = "all" ]
 then
     if [ -e Allwmake ]
     then
         ./Allwmake
         exit $?
-    elif [ ! -d $MakeDir ]
-    then
-        # FOAM_APPS=$(find . -maxdepth 1 \( -type d -a ! -name "." -a ! -name Optional -a ! -name Make \)  -printf "%f ")
-        # avoid 'find' with '-printf' ... not entirely portable
-        FOAM_APPS=$(for d in *; do [ -d "$d" -a "$d" != Optional -a "$d" != Make ] && echo "$d"; done | xargs)
-        $make -k -f $WM_DIR/MakefileApps FOAM_APPS="$FOAM_APPS"
-        exit $?
+    else
+        # Find all the sub-directories containing a 'Make' directory
+        FOAM_APPS=$(\
+                       for d in *; \
+                       do [ -d "$d" -a "$d" != Optional -a "$d" != Make ] \
+                          && echo "$d"; \
+                       done | xargs \
+                 )
+        if [ ! "$FOAM_APPS" = "" ]
+        then
+            # Compile all applications in sub-directories
+            $make ${WM_CONTINUE_ON_ERROR:+-k} \
+                  -f $WM_DIR/MakefileApps \
+                  TARGET="$targetType" FOAM_APPS="$FOAM_APPS"
+        fi
+        # If the current directory contains a 'Make' directory continue
+        # otherwise exit
+        if [ ! -d $MakeDir ]
+        then
+            exit $?
+        fi
     fi
 fi
 
 
 #------------------------------------------------------------------------------
-# Search up directories tree for the Make sub-directory and build there
-# Also check the existance of the 'files' file
+# Search up the directory tree for the Make sub-directory,
+# check the existance of the 'files' file and build there if present
 #------------------------------------------------------------------------------
 
 unset dir
-MakeDir=Make
 
-expandpath()
+expandPath()
 {
-    dir=`dirname $1`
+    dir=$(dirname $1)
     cwd=$PWD
     cd $dir
     exPath=$PWD
     cd $cwd
 }
 
-find_target()
+findTarget()
 {
-    expandpath $1
+    expandPath $1
 
-    if [ "$exPath" = "$WM_PROJECT_DIR" -o "$exPath" = "$HOME" -o "$exPath" = "/" ]
+    if [ "$exPath" = "$WM_PROJECT_DIR" \
+                   -o "$exPath" = "$HOME" \
+                   -o "$exPath" = "/" \
+       ]
     then
-        echo "$Script error: could not find Make directory"
+        echo "$Script error: could not find Make directory" 1>&2
     elif [ -d "$1/Make" ]; then
         echo "    Found target directory " $1
         dir=$1
     else
-        find_target "$1/.."
+        findTarget "$1/.."
     fi
 }
 
@@ -228,8 +278,8 @@ then
     echo "$Script: '$MakeDir' directory does not exist in $PWD" 1>&2
     echo "    Searching up directories tree for Make directory"
 
-    find_target .
-    makeType=
+    findTarget .
+    targetType=
 
     if [ "$dir" ]
     then
@@ -251,14 +301,14 @@ fi
 # Transform options
 #------------------------------------------------------------------------------
 
-# transform "all" or no option to "libso" if that looks appropriate or remove it
+# Transform no option to "libso" if that looks appropriate or remove it
 # so that the call to make builds the application
-if [ "$makeType" = all -o "$makeType" = "" ]
+if [ "$targetType" = "" ]
 then
-    unset makeType
+    unset targetType
     if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
     then
-        makeType=libso
+        targetType=libso
     fi
 fi
 
@@ -268,23 +318,33 @@ fi
 # files and options being built in parallel
 #------------------------------------------------------------------------------
 
+objectsDir=$MakeDir/$WM_OPTIONS
+if echo $PWD | grep "$WM_PROJECT_DIR"
+then
+    platformPath=$WM_PROJECT_DIR/platforms/${WM_OPTIONS}
+    objectsDir=$platformPath$(echo $PWD | sed s%$WM_PROJECT_DIR%% )
+fi
+
 (
-    cd $MakeDir
     unset MAKEFLAGS
-    make -s -f $WM_DIR/MakefileOptions
-    make -s -f $WM_DIR/MakefileFiles allFiles
+    mkdir -p $objectsDir
+
+    # Pre-build the $WM_OPTIONS/options file
+    # which is included when building the $WM_OPTIONS/files file
+    $make -s -f $WM_DIR/MakefileFiles MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir\
+          $objectsDir/options
+
+    $make -s -f $WM_DIR/MakefileFiles MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir
 )
 
 
 #------------------------------------------------------------------------------
-# Check the $OBJECTS_DIR = $MakeDir/$WM_OPTIONS/objectFiles file
-# was created successfully
+# Check the $objectsDir/sourceFiles file was created successfully
 #------------------------------------------------------------------------------
 
-OBJECTS_DIR=$MakeDir/$WM_OPTIONS
-
-[ -r $OBJECTS_DIR/objectFiles ] || {
-    echo "$Script error: file '$OBJECTS_DIR/objectFiles' could not be created in $PWD" 1>&2
+[ -r $objectsDir/sourceFiles ] || {
+    echo "$Script error: file '$objectsDir/sourceFiles'" \
+         "could not be created in $PWD" 1>&2
     exit 1
 }
 
@@ -293,29 +353,32 @@ OBJECTS_DIR=$MakeDir/$WM_OPTIONS
 # Make the dependency files
 #------------------------------------------------------------------------------
 
-touch $OBJECTS_DIR/dontIncludeDeps
-
-case "$makeType" in
-lib | libo | libso | dep )
-    $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontIncludeDeps lnInclude/uptodate
-    ;;
+# For libraries create lnInclude ...
+case "$targetType" in
+    lib | libo | libso | dep )
+        # ... but only if 'LIB' is declared in 'Make/files'
+        if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
+        then
+            $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir \
+                  OBJECTS_DIR=$objectsDir lnInclude
+        fi
+        ;;
 esac
 
-$make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontIncludeDeps $OBJECTS_DIR/dependencies
 
-rc=$?
-[ $rc -eq 0 ] || exit $rc
+#------------------------------------------------------------------------------
+# Make the dependency files or object files and link
+#------------------------------------------------------------------------------
+
+exec $make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir \
+     $targetType
 
 
 #------------------------------------------------------------------------------
-# Make the object files and link
+# Cleanup local variables and functions
 #------------------------------------------------------------------------------
 
-if [ "$makeType" != dep ]
-then
-    cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType"
-    # echo "cmd=$cmd"
-    exec $cmd
-fi
+unset Script usage expandPath findTarget
+
 
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeCheckPwd b/wmake/wmakeCheckPwd
index 8de18be3a9e42d0293b27d44a510a803845dc1e5..75aedba30d61ef7a78dde894f2726a517eae8de0 100755
--- a/wmake/wmakeCheckPwd
+++ b/wmake/wmakeCheckPwd
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -23,13 +23,14 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # Script
-#     wmakeCheckPwd
+#     wmakeCheckPwd <dir>
 #
 # Description
-#     Check that the current working directory is equal to a particular
-#     target directory, resolving the absolute path as required
+#     Check that the current working directory is the directory <dir>
 #
 #-------------------------------------------------------------------------------
+Script=${0##*/}
+
 unset quietOpt
 
 usage() {
@@ -38,13 +39,12 @@ usage() {
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
 
-usage: ${0##*/} [OPTION] dirName
+Usage: $Script [OPTION] dirName
 
 options:
   -q | -quiet   suppress all normal output
 
-  Check that the current working directory is equal to a particular
-  target directory, resolving the absolute path as required
+  Check that the current working directory is the directory <dir>
 
   Exit status 0 when the directories are identical
   Exit status 1 on error
@@ -54,7 +54,10 @@ USAGE
 }
 
 
-# parse options
+#------------------------------------------------------------------------------
+# Parse arguments and options
+#------------------------------------------------------------------------------
+
 while [ "$#" -gt 0 ]
 do
     case "$1" in
@@ -76,27 +79,40 @@ done
 
 
 [ "$#" -eq 1 ] || usage
-dirName="$1"
 
+# Set dirName to <dir>
+dirName="$1"
 
-# trivial checks first
+# Simple check against $PWD
 [ "$PWD" = "$dirName" ] && exit 0
 
+# Check existance of <dir>
 [ -d "$dirName" ] || {
-    [ "$quietOpt" = true ] || echo "Error: Directory does not exist $dirName"
+    [ "$quietOpt" = true ] || {
+        echo "$Script error: Directory does not exist $dirName"
+    }
     exit 1
 }
 
-
-# use /bin/pwd to get the absolute path (could be linked)
+# Use /bin/pwd to get the absolute path (could be linked)
 thisDir=$(/bin/pwd)
 target=$(cd $dirName 2>/dev/null && /bin/pwd)
 
-# okay
+# Return 0 if this directory is <dir>
 [ "$thisDir" = "$target" ] && exit 0
 
-# some other error
-[ "$quietOpt" = true ] || echo "Error: Current directory is not $dirName"
+# This directory is not <dir>
+[ "$quietOpt" = true ] || {
+    echo "$Script error: Current directory is not $dirName"
+}
 exit 1
 
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script usage
+
+
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeFilesAndOptions b/wmake/wmakeFilesAndOptions
index d43d8bf5a2376363fd7e3c8f489a957b18210738..022d3ed2456b71913ae2925d5af63ca8e7eb3c41 100755
--- a/wmake/wmakeFilesAndOptions
+++ b/wmake/wmakeFilesAndOptions
@@ -38,7 +38,7 @@ usage() {
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
 
-usage: ${0##*/}
+Usage: $Script
 
     Scan current directory for directories and source files
     and construct 'Make/files' and 'Make/options'
@@ -48,7 +48,10 @@ USAGE
 }
 
 
-# simple parse options
+#------------------------------------------------------------------------------
+# Parse arguments and options
+#------------------------------------------------------------------------------
+
 while [ "$#" -gt 0 ]
 do
     case "$1" in
@@ -64,12 +67,13 @@ do
     esac
 done
 
-# no arguments
+# No arguments
 [ "$#" -eq 0 ] || usage "unexpected arguments: '$*'"
 
-#
-# check environment variables
-#
+
+#------------------------------------------------------------------------------
+# Check environment variables
+#------------------------------------------------------------------------------
 for check in WM_OPTIONS WM_LINK_LANGUAGE WM_DIR
 do
     eval test "\$$check" || {
@@ -96,4 +100,12 @@ fi
     $WM_DIR/scripts/makeOptions
 }
 
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script usage
+
+
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeFindEmptyMake b/wmake/wmakeFindEmptyMake
deleted file mode 100755
index d41b52671db5341d4d77132014350d102edf8e65..0000000000000000000000000000000000000000
--- a/wmake/wmakeFindEmptyMake
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-#    \\/     M anipulation  |
-#-------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software: you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by
-#     the Free Software Foundation, either version 3 of the License, or
-#     (at your option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Script
-#     wmakeFindEmptyMake
-#
-# Description
-#     Find 'Make/' directories without 'files' or 'options'.
-#     These typically correspond to (partially) removed applications.
-#
-#------------------------------------------------------------------------------
-usage() {
-    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
-    cat<<USAGE
-
-usage: ${0##*/} [dir1 .. dirN]
-
-    Find 'Make/' directories without 'files' or 'options'.
-    These typically correspond to (partially) removed applications.
-
-USAGE
-    exit 1
-}
-
-#------------------------------------------------------------------------------
-findName=lnInclude
-
-# simple parse options
-while [ "$#" -gt 0 ]
-do
-    case "$1" in
-    -h | -help)   # provide immediate help
-        usage
-        ;;
-    -*)
-        usage "unknown option: '$*'"
-        ;;
-    *)
-        break
-        ;;
-    esac
-done
-
-
-# default to searching from pwd
-[ "$#" -gt 0 ] || set -- .
-
-for checkDir
-do
-    if [ -d $checkDir ]
-    then
-        echo "searching: $checkDir for 'Make' directories without 'files' or 'options'" 1>&2
-        echo "---------" 1>&2
-    else
-        echo "skipping non-dir: $checkDir" 1>&2
-        echo "----------------" 1>&2
-        continue
-    fi
-
-    find $checkDir -depth -type d -name Make -print | while read MakeDir
-    do
-        [ -f "$MakeDir/files" -o -f "$MakeDir/options" ] || echo $MakeDir
-    done
-done
-
-#------------------------------------------------------------------------------
diff --git a/wmake/wmakeLnInclude b/wmake/wmakeLnInclude
index fa8dc97fe060f3ad97fd47e1546eb855e89a1377..b68c31a6e07449677cf06efcd154eb86e11520a4 100755
--- a/wmake/wmakeLnInclude
+++ b/wmake/wmakeLnInclude
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -36,6 +36,7 @@
 #     Avoid
 #         *.c (C source)
 #         .#* (cvs recovered files)
+#
 #------------------------------------------------------------------------------
 Script=${0##*/}
 
@@ -61,17 +62,19 @@ USAGE
     exit 1
 }
 
+
+#------------------------------------------------------------------------------
+# Parse arguments and options
 #------------------------------------------------------------------------------
 
-# default 'find' option
+# Default 'find' option
 unset findOpt
 
-# default 'ln' option
+# Default 'ln' option
 lnOpt="-s"
 
 unset forceUpdate silentOpt
 
-# simple parse options
 while [ "$#" -gt 0 ]
 do
     case "$1" in
@@ -100,11 +103,11 @@ if [ $# -eq 1 ]
 then
     baseDir=$1
 else
-    usage "ERROR: incorrect number of arguments"
+    usage "Error: incorrect number of arguments"
 fi
 
 
-# convert incorrect path/dir/lnInclude to something sensible
+# Convert incorrect path/dir/lnInclude to something sensible
 while [ "${baseDir##*/}" = lnInclude ]
 do
     baseDir="${baseDir%/*}"
@@ -138,25 +141,39 @@ fi
 
 cd $incDir || exit 1
 
-#------------------------------------------------------------------------------
-
 if [ "$silentOpt" != true ]
 then
     echo "$Script: linking include files to $incDir" 1>&2
 fi
 
-#
-# remove any broken links first (this helps when file locations have moved)
-#
+
+#------------------------------------------------------------------------------
+# Remove any broken links first (this helps when file locations have moved)
+#------------------------------------------------------------------------------
 find -L . -type l -exec rm {} \;
 
-#
-# create links, avoid recreating links unless necessary
+
+#------------------------------------------------------------------------------
+# Create links, avoid recreating links unless necessary
 # things placed in the 'noLink' directory are skipped
-#
+#------------------------------------------------------------------------------
 find .. $findOpt \
-    \( -name lnInclude -o -name Make -o -name config -o -name noLink \) -prune \
- -o \( -name '*.[CHh]' -o -name '*.[ch]xx' -o -name '*.[ch]pp' -o -name '*.type' \)  \
- -exec ln $lnOpt {} . \;
+     \( -name lnInclude -o -name Make -o -name config -o -name noLink \) \
+     -prune \
+     -o \( \
+     -name '*.[CHh]' \
+     -o -name '*.[ch]xx' \
+     -o -name '*.[ch]pp' \
+     -o -name '*.type' \
+     \)  \
+     -exec ln $lnOpt {} . \;
+
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script usage
+
 
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeLnIncludeAll b/wmake/wmakeLnIncludeAll
index 1c396678b2ba231b0ed80df7aed17c95000cae7f..0ecaf9ec5d92a60a928405d338992607ef54260e 100755
--- a/wmake/wmakeLnIncludeAll
+++ b/wmake/wmakeLnIncludeAll
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -30,11 +30,13 @@
 #     and execute 'wmakeLnInclude -f' for each one
 #
 #------------------------------------------------------------------------------
+Script=${0##*/}
+
 usage() {
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
 
-usage: ${0##*/} [dir1 .. dirN]
+Usage: $Script [dir1 .. dirN]
 
     Find directories with a 'Make/files' that contains a 'LIB =' directive
     and execute 'wmakeLnInclude -f' for each one
@@ -43,10 +45,13 @@ USAGE
     exit 1
 }
 
+
+#------------------------------------------------------------------------------
+# Parse arguments and options
 #------------------------------------------------------------------------------
+
 findName=lnInclude
 
-# simple parse options
 while [ "$#" -gt 0 ]
 do
     case "$1" in
@@ -63,7 +68,7 @@ do
 done
 
 
-# default to searching from pwd
+# Default to searching from CWD
 [ "$#" -gt 0 ] || set -- .
 
 for checkDir
@@ -95,4 +100,12 @@ do
     done
 done
 
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script usage
+
+
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakePrintBuild b/wmake/wmakePrintBuild
index 26cd5ef6ce6e86ebfef6bdb14b2dc48fd68b72db..cc554513dcc30ebf9e57a52e9a247a31c6db19ef 100755
--- a/wmake/wmakePrintBuild
+++ b/wmake/wmakePrintBuild
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -29,15 +29,14 @@
 #     Print the version used when building the project
 #
 #------------------------------------------------------------------------------
-# persistent build tag
-build="$WM_PROJECT_DIR/.build"
+Script=${0##*/}
 
 usage() {
     exec 1>&2
 
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
-usage: ${0##*/} [OPTION]
+Usage: $Script [OPTION]
 options:
   -check          check the git head commit vs. \$WM_PROJECT_DIR/.build
                   (exit code 0 for no changes)
@@ -55,11 +54,13 @@ Print the version used when building the project, in this order of precedence:
 USAGE
     exit 1
 }
-#------------------------------------------------------------------------------
 
+
+#------------------------------------------------------------------------------
+# Parse arguments and options
+#------------------------------------------------------------------------------
 unset checkOnly update package version shortOpt
 
-# parse options
 while [ "$#" -gt 0 ]
 do
     case "$1" in
@@ -80,7 +81,7 @@ do
         ;;
     -pkg | -package)
         [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
-        # mark empty as 'none', disallow '!' in string
+        # Mark empty as 'none', disallow '!' in string
         package=$(echo "${2:-none}" | sed -e 's/!//g')
         shift 2
         ;;
@@ -101,10 +102,14 @@ done
 
 #------------------------------------------------------------------------------
 
-#
-# retrieve old values from the $WM_PROJECT_DIR/.build cache, stored as
+# Persistent build tag
+build="$WM_PROJECT_DIR/.build"
+
+
+#------------------------------------------------------------------------------
+# Retrieve old values from the $WM_PROJECT_DIR/.build cache, stored as
 #     version [packager]
-#
+#------------------------------------------------------------------------------
 unset oldPackage oldVersion
 getOldValues()
 {
@@ -115,10 +120,9 @@ getOldValues()
     [ "${oldPackage:-none}" = none ] && unset oldPackage
 }
 
-#
-# printTag - output the build tag
-# reuses the old -package tag if needed
-#
+#------------------------------------------------------------------------------
+# printTag - output the build tag, reuses the old -package tag if needed
+#------------------------------------------------------------------------------
 printTag()
 {
     if [ "${package:-${oldPackage:-none}}" = none ]
@@ -130,13 +134,16 @@ printTag()
 }
 
 
+#------------------------------------------------------------------------------
+# Get the version
+#------------------------------------------------------------------------------
 
 if [ -n "$version" ]
 then
-    # specified a version - no error possible
+    # Specified a version - no error possible
     rc=0
 else
-    # get the head SHA1 when building under git
+    # Get the head SHA1 when building under git
     # if there are multiple values (eg, HEAD, origin/HEAD, ...)
     # only take the first one, which is 'HEAD'
     version=$(
@@ -146,17 +153,17 @@ else
 
     if [ -n "$version" ]
     then
-        # mark as success and prefix with WM_PROJECT_VERSION
+        # Mark as success and prefix with WM_PROJECT_VERSION
         rc=0
         version="${WM_PROJECT_VERSION}-$version"
     else
-        # mark as failure
+        # Mark as failure
         rc=1
     fi
 fi
 
 
-# retrieve old values
+# Retrieve old values
 getOldValues
 
 if [ "$shortOpt" = true ]
@@ -164,9 +171,10 @@ then
     unset package oldPackage
 fi
 
-#
-# update persistent build tag if possible
-#
+
+#------------------------------------------------------------------------------
+# Update persistent build tag if possible
+#------------------------------------------------------------------------------
 if [ $rc -eq 0 -a -n "$update" ]
 then
     if [ "$version:$package" != "$oldVersion:$oldPackage" ]
@@ -178,16 +186,10 @@ then
     fi
 fi
 
-# cat<< DEBUG 1>&2
-# Debug information
-#     version='$version'
-#     package='$package'
-#     oldVersion='$oldVersion'
-#     oldPackage='$oldPackage'
-# DEBUG
 
-
-# check git vs. persistent build tag
+#------------------------------------------------------------------------------
+# Check git vs. persistent build tag
+#------------------------------------------------------------------------------
 if [ -n "$checkOnly" ]
 then
     if [ $rc -eq 0 ]
@@ -207,23 +209,26 @@ then
 fi
 
 
-#
-# cannot get git information or  -version version
-#
+#------------------------------------------------------------------------------
+# Cannot get git information or  -version version
+#------------------------------------------------------------------------------
 if [ $rc -ne 0 ]
 then
     if [ -n "$oldVersion" ]
     then
-        # use previous version info
+        # Use previous version info
         version="$oldVersion"
     else
-        # fallback to WM_PROJECT_VERSION alone
+        # Fallback to WM_PROJECT_VERSION alone
         version="${WM_PROJECT_VERSION:-unknown}"
     fi
 fi
 
 
-# output the tag
+#------------------------------------------------------------------------------
+# Output the tag
+#------------------------------------------------------------------------------
 printTag
 
+
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeScheduler b/wmake/wmakeScheduler
index c079883c6c79667cce62c719421993e546e1ffa4..7b3d51e91baebb5fda6f7b655c6193e1fe05b41b 100755
--- a/wmake/wmakeScheduler
+++ b/wmake/wmakeScheduler
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -48,16 +48,17 @@
 #         eg,  export WM_NCOMPPROCS=$(wmakeScheduler -count)
 #
 #-------------------------------------------------------------------------------
+Script=${0##*/}
 
 # csh sets HOST, bash sets HOSTNAME
 : ${HOST:=$HOSTNAME}
 
-
 lockDir=$HOME/.$WM_PROJECT/.wmake
-# fallback - 1 core on current host
+
+# Fallback - 1 core on current host
 : ${WM_HOSTS:=$HOST:1}
 
-# count the total number of slots available and exit
+# Count the total number of slots available and exit
 if [ "$1" = "-count" ]
 then
     expr $(
@@ -71,12 +72,12 @@ then
     exit 0
 fi
 
-# where to source WM_PROJECT settings in a remote shell
+# Where to source WM_PROJECT settings in a remote shell
 # This code tries to figure out which cshrc or bashrc to execute.
 # !! Assumes remote computer running same shell and startup files
 # in same location
 
-sourceFoam=false    # fallback command
+sourceFoam=false    # Fallback command
 case $SHELL in
 */csh | */tcsh )    # [t]csh vs bash|ksh|sh
     shellRc=cshrc
@@ -86,9 +87,9 @@ case $SHELL in
     ;;
 esac
 
-# check ~/.$WM_PROJECT/$WM_PROJECT_VERSION/
-# check ~/.$WM_PROJECT/
-# check <installedProject>/etc/
+# Check ~/.$WM_PROJECT/$WM_PROJECT_VERSION/
+# Check ~/.$WM_PROJECT/
+# Check <installedProject>/etc/
 if [ "$WM_PROJECT" ]
 then
     for i in \
@@ -125,9 +126,9 @@ case $sourceFoam in
     ;;
 esac
 
-# quote double-quotes for remote command line
+# Quote double-quotes for remote command line
 rcmd=$(echo $* | sed -e s/\"/\'\"\'/g)
-## the same, without forking (not ksh, maybe not /bin/sh either)
+# The same, without forking (not ksh, maybe not /bin/sh either)
 # rcmd=$(while [ "$#" -gt 0 ]; do echo "${1//\"/'\"'}"; shift; done)
 
 
@@ -146,9 +147,9 @@ done
 set -o pipefail
 
 
-#
-# colour output by argument 1
-#
+#------------------------------------------------------------------------------
+# Colour output by argument 1
+#------------------------------------------------------------------------------
 colourPipe()
 {
 
@@ -173,7 +174,7 @@ colourIndex=0
 # Check for existence of lockfile binary
 if ! type -p lockfile >/dev/null
 then
-    echo "Could not find executable 'lockfile'"
+    echo "$Script: Could not find executable 'lockfile'"
     exit 1
 fi
 
@@ -181,7 +182,7 @@ while :
 do
     for slotGroup in $WM_HOSTS
     do
-        # split 'host:N', but catch 'host:' and 'host' too
+        # Split 'host:N', but catch 'host:' and 'host' too
         host=${slotGroup%%:*}
         n=${slotGroup##*:}
         [ "$n" = "$host" ] && n=1  # missing ':'
@@ -201,14 +202,16 @@ do
                     if [ "$host" = "$HOST" ]; then
                         eval $* 2>&1 | colourPipe "$colour"
                     else
-                        ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" 2>&1 | colourPipe "$colour"
+                        ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" \
+                            2>&1 | colourPipe "$colour"
                     fi
                     retval=$?
                 else
                     if [ "$host" = "$HOST" ]; then
                         eval $* 2>&1
                     else
-                        ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" 2>&1
+                        ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" \
+                            2>&1
                     fi
                     retval=$?
                 fi
@@ -234,4 +237,12 @@ then
     setterm -foreground default
 fi
 
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script
+
+
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeSchedulerUptime b/wmake/wmakeSchedulerUptime
index 06442045bbc89dfdb1c175bfe7c55b483eadf1b3..eb52f4061504a7db22d9dece04db07d640c4fa67 100755
--- a/wmake/wmakeSchedulerUptime
+++ b/wmake/wmakeSchedulerUptime
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -48,16 +48,16 @@
 #         eg,  export WM_NCOMPPROCS=$(wmakeScheduler -count)
 #
 #-------------------------------------------------------------------------------
+Script=${0##*/}
 
 # csh sets HOST, bash sets HOSTNAME
 : ${HOST:=$HOSTNAME}
 
-
 lockDir=$HOME/.$WM_PROJECT/.wmake
-# fallback - 1 core on current host
+# Fallback - 1 core on current host
 : ${WM_HOSTS:=$HOST:1}
 
-# count the total number of slots available and exit
+# Count the total number of slots available and exit
 if [ "$1" = "-count" ]
 then
     expr $(
@@ -71,7 +71,7 @@ then
     exit 0
 fi
 
-# where to source WM_PROJECT settings in a remote shell
+# Where to source WM_PROJECT settings in a remote shell
 # This code tries to figure out which cshrc or bashrc to execute.
 # !! Assumes remote computer running same shell and startup files
 # in same location
@@ -86,9 +86,9 @@ case $SHELL in
     ;;
 esac
 
-# check ~/.$WM_PROJECT/$WM_PROJECT_VERSION/
-# check ~/.$WM_PROJECT/
-# check <installedProject>/etc/
+# Check ~/.$WM_PROJECT/$WM_PROJECT_VERSION/
+# Check ~/.$WM_PROJECT/
+# Check <installedProject>/etc/
 if [ "$WM_PROJECT" ]
 then
     for i in \
@@ -210,7 +210,7 @@ do
         load=`echo "$stat" | sed -e 's/.*average:[^0-9.]*\([0-9.]*\).*/\1/'`
 
 
-        #echo "Machine:$host  load:$load  allowed:$WM_NCOMPPROCS  nprocs:$nprocs"
+        #echo "$Script: Machine:$host  load:$load  allowed:$WM_NCOMPPROCS  nprocs:$nprocs"
 
 
         # Check if adding nprocs to load causes overload
@@ -220,16 +220,17 @@ do
             then
                 # Set colour
                 colour="${colourList[$colourIndex]}"
-                echo "Machine:$host  Starting:$*"
+                echo "$Script: Machine:$host  Starting:$*"
 
                 if [ "$host" = "$HOST" ]; then
                     eval $* 2>&1 | colourPipe "$colour"
                 else
-                    ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" 2>&1 | colourPipe "$colour"
+                    ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" 2>&1 \
+                        | colourPipe "$colour"
                 fi
                 retval=$?
             else
-                echo "Machine:$host  Starting:$*"
+                echo "$Script: Machine:$host  Starting:$*"
                 if [ "$host" = "$HOST" ]; then
                     eval $* 2>&1
                 else
@@ -248,8 +249,16 @@ do
     done
 
     # Did not find any free machines. Rest a bit.
-    #echo "Too much load. Waiting"
+    #echo "$Script: Too much load. Waiting"
     sleep 1
 done
 
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script
+
+
 #------------------------------------------------------------------------------