diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
index 5aae0ede0ebf81adb979a655c6211425b9c95875..5dd7671b948c6286157ef84b8f138b1fde1c6c2a 100644
--- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
+++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
@@ -913,8 +913,8 @@ int main(int argc, char *argv[])
 
             // Info<< "span " << span << endl;
 
-            pointField start = searchSurf.faceCentres() - span*normals;
-            pointField end = searchSurf.faceCentres() + span*normals;
+            pointField start(searchSurf.faceCentres() - span*normals);
+            pointField end(searchSurf.faceCentres() + span*normals);
             const pointField& faceCentres = searchSurf.faceCentres();
 
             List<List<pointIndexHit> > allHitInfo;
diff --git a/src/conversion/ensight/part/ensightPartCells.C b/src/conversion/ensight/part/ensightPartCells.C
index 4c44abedcb1ba97f2dca3d861df1d6b67dfd2385..80f0cdc4ce61126c71f9f35b7a422fcac139fcfe 100644
--- a/src/conversion/ensight/part/ensightPartCells.C
+++ b/src/conversion/ensight/part/ensightPartCells.C
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -313,6 +313,7 @@ void Foam::ensightPartCells::writeConnectivity
     if (key == "nfaced")
     {
         const faceList& meshFaces = mesh_.faces();
+        const labelUList& owner = mesh_.faceOwner();
 
         // write the number of faces per element
         forAll(idList, i)
@@ -345,16 +346,33 @@ void Foam::ensightPartCells::writeConnectivity
             const label id = idList[i] + offset_;
             const labelUList& cFace = mesh_.cells()[id];
 
-            forAll(cFace, faceI)
+            forAll(cFace, cFaceI)
             {
-                const face& cf = meshFaces[cFace[faceI]];
+                const label faceId = cFace[cFaceI];
+                const face& cf = meshFaces[faceId];
+
+                // convert global -> local index
+                // (note: Ensight indices start with 1)
 
-                forAll(cf, ptI)
+                // ensight >= 9 needs consistently oriented nfaced cells
+                if (id == owner[faceId])
                 {
-                    // convert global -> local index
-                    // (note: Ensight indices start with 1)
-                    os.write(pointMap[cf[ptI]] + 1);
+                    forAll(cf, ptI)
+                    {
+                        os.write(pointMap[cf[ptI]] + 1);
+                    }
                 }
+                else
+                {
+                    // as per face::reverseFace(), but without copying
+
+                    os.write(pointMap[cf[0]] + 1);
+                    for (label ptI = cf.size()-1; ptI > 0; --ptI)
+                    {
+                        os.write(pointMap[cf[ptI]] + 1);
+                    }
+                }
+
                 os.newline();
             }
         }
diff --git a/src/fieldSources/basicSource/rotorDiskSource/profileModel/series/seriesProfile.C b/src/fieldSources/basicSource/rotorDiskSource/profileModel/series/seriesProfile.C
index 865ed3ab62ec7459c76ad59b6e7bb1d417c233f1..fb695078255d7f5015a3c85e9ce96a80473914ab 100644
--- a/src/fieldSources/basicSource/rotorDiskSource/profileModel/series/seriesProfile.C
+++ b/src/fieldSources/basicSource/rotorDiskSource/profileModel/series/seriesProfile.C
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,7 @@ Foam::scalar Foam::seriesProfile::evaluate
 
     forAll(values, i)
     {
-        result += values[i]*cos((i+1)*xIn);
+        result += values[i]*sin((i + 1)*xIn);
     }
 
     return result;
diff --git a/src/fieldSources/basicSource/rotorDiskSource/profileModel/series/seriesProfile.H b/src/fieldSources/basicSource/rotorDiskSource/profileModel/series/seriesProfile.H
index 73b474aae1f3bb22bbdbacc1b29ea35a914051fb..7c4793e28e9fbe954dd6bf72af0a22c314038665 100644
--- a/src/fieldSources/basicSource/rotorDiskSource/profileModel/series/seriesProfile.H
+++ b/src/fieldSources/basicSource/rotorDiskSource/profileModel/series/seriesProfile.H
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,8 +28,8 @@ Description
     Series-up based profile data - drag and lift coefficients computed as
     sum of cosine series
 
-        Cd = sum_i(CdCoeff)*cos(i*AOA)
-        Cl = sum_i(ClCoeff)*cos(i*AOA)
+        Cd = sum_i(CdCoeff)*sin(i*AOA)
+        Cl = sum_i(ClCoeff)*sin(i*AOA)
 
     where:
         AOA = angle of attack [deg] converted to [rad] internally
diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C
index d7134f5cd370c780767ae55fd113b24995fef91a..e65329296b73a05ad79ea6fa170164943be6a222 100644
--- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C
+++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C
@@ -70,8 +70,7 @@ void Foam::KinematicCloud<CloudType>::setModels()
         SurfaceFilmModel<KinematicCloud<CloudType> >::New
         (
             subModelProperties_,
-            *this,
-            g_
+            *this
         ).ptr()
     );
 
diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H
index ab0e7ed940587014b345ede6e14d34103450bf01..c7db0661878739b505930d6e03b335e57caa4399 100644
--- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H
+++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H
@@ -241,7 +241,7 @@ inline Foam::scalar Foam::KinematicCloud<CloudType>::massInSystem() const
     forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
     {
          const parcelType& p = iter();
-         sysMass += p.mass()*p.nParticle();
+         sysMass += p.nParticle()*p.mass();
     }
 
     return sysMass;
@@ -258,7 +258,7 @@ Foam::KinematicCloud<CloudType>::linearMomentumOfSystem() const
     {
         const parcelType& p = iter();
 
-        linearMomentum += p.mass()*p.U();
+        linearMomentum += p.nParticle()*p.mass()*p.U();
     }
 
     return linearMomentum;
@@ -275,7 +275,7 @@ Foam::KinematicCloud<CloudType>::linearKineticEnergyOfSystem() const
     {
         const parcelType& p = iter();
 
-        linearKineticEnergy += 0.5*p.mass()*(p.U() & p.U());
+        linearKineticEnergy += p.nParticle()*0.5*p.mass()*(p.U() & p.U());
     }
 
     return linearKineticEnergy;
@@ -293,7 +293,7 @@ Foam::KinematicCloud<CloudType>::rotationalKineticEnergyOfSystem() const
         const parcelType& p = iter();
 
         rotationalKineticEnergy +=
-            0.5*p.momentOfInertia()*(p.omega() & p.omega());
+            p.nParticle()*0.5*p.momentOfInertia()*(p.omega() & p.omega());
     }
 
     return rotationalKineticEnergy;
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H
index 100e33e9e240c2deedf109ff713ae31d9ce3546e..05efc427a49db5ae7d652ec7ca3d25d8a7e1b3c6 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ class CellZoneInjection
     // Private data
 
         //- Name of cell zone
-        const word& cellZoneName_;
+        const word cellZoneName_;
 
         //- Number density
         const scalar numberDensity_;
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.C
index 86c721efc1423e3fca536f88ac02b769773bdcba..399730c95088ccfb0ce125cf0d0046291ec101e5 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.C
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,7 @@ template<class CloudType>
 Foam::NoSurfaceFilm<CloudType>::NoSurfaceFilm
 (
     const dictionary&,
-    CloudType& owner,
-    const dimensionedVector&
+    CloudType& owner
 )
 :
     SurfaceFilmModel<CloudType>(owner)
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H
index 672feb967e6455e90964a530f888794cb6f8fe45..b67136aa6af5d77f49ee387f0a225b5c49d9d728 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -68,7 +68,7 @@ public:
     // Constructors
 
         //- Construct from dictionary
-        NoSurfaceFilm(const dictionary&, CloudType&, const dimensionedVector&);
+        NoSurfaceFilm(const dictionary&, CloudType&);
 
         //- Construct copy
         NoSurfaceFilm(const NoSurfaceFilm<CloudType>& dm);
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C
index 46fb9296dc1624edc38fbe0475181bc85f4d0d66..7eb6e8cfeeff6aa1c369c357a7a998fe2230d997 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,7 @@ template<class CloudType>
 Foam::SurfaceFilmModel<CloudType>::SurfaceFilmModel(CloudType& owner)
 :
     SubModelBase<CloudType>(owner),
-    g_(dimensionedVector("zero", dimAcceleration, vector::zero)),
+    g_(owner.g()),
     ejectedParcelType_(0),
     massParcelPatch_(0),
     diameterParcelPatch_(0),
@@ -53,12 +53,11 @@ Foam::SurfaceFilmModel<CloudType>::SurfaceFilmModel
 (
     const dictionary& dict,
     CloudType& owner,
-    const dimensionedVector& g,
     const word& type
 )
 :
     SubModelBase<CloudType>(owner, dict, typeName, type),
-    g_(g),
+    g_(owner.g()),
     ejectedParcelType_
     (
         this->coeffDict().lookupOrDefault("ejectedParcelType", -1)
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H
index 967e748f56c8385483aca4dd3c2f4f280fa42da6..b822ee644a6d2c34c4bcdd8458ce67a57170ae2d 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -140,10 +140,9 @@ public:
         dictionary,
         (
             const dictionary& dict,
-            CloudType& owner,
-            const dimensionedVector& g
+            CloudType& owner
         ),
-        (dict, owner, g)
+        (dict, owner)
     );
 
 
@@ -157,7 +156,6 @@ public:
         (
             const dictionary& dict,
             CloudType& owner,
-            const dimensionedVector& g,
             const word& type
         );
 
@@ -182,8 +180,7 @@ public:
     static autoPtr<SurfaceFilmModel<CloudType> > New
     (
         const dictionary& dict,
-        CloudType& owner,
-        const dimensionedVector& g
+        CloudType& owner
     );
 
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C
index 49702268a1604016eda953c49992aead8988e792..b2e7d479667a5e53d3aa6d910f5a204bcacc9007 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,7 @@ Foam::autoPtr<Foam::SurfaceFilmModel<CloudType> >
 Foam::SurfaceFilmModel<CloudType>::New
 (
     const dictionary& dict,
-    CloudType& owner,
-    const dimensionedVector& g
+    CloudType& owner
 )
 {
     const word modelType(dict.lookup("surfaceFilmModel"));
@@ -59,7 +58,7 @@ Foam::SurfaceFilmModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<SurfaceFilmModel<CloudType> >(cstrIter()(dict, owner, g));
+    return autoPtr<SurfaceFilmModel<CloudType> >(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C
index 6a6c60db3984390169d526e356537dd40f29575a..51ab413fee44dc71f32e745e156fd8c8c881bcd4 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -487,11 +487,10 @@ template<class CloudType>
 Foam::ThermoSurfaceFilm<CloudType>::ThermoSurfaceFilm
 (
     const dictionary& dict,
-    CloudType& owner,
-    const dimensionedVector& g
+    CloudType& owner
 )
 :
-    SurfaceFilmModel<CloudType>(dict, owner, g, typeName),
+    SurfaceFilmModel<CloudType>(dict, owner, typeName),
     rndGen_(owner.rndGen()),
     thermo_
     (
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H
index bddbfcc66e9f28034472ff045a00e984850fc896..5868916c2adea66de5a7e72dd1b5c00e66095a8e 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H
@@ -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-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -248,12 +248,7 @@ public:
     // Constructors
 
         //- Construct from components
-        ThermoSurfaceFilm
-        (
-            const dictionary& dict,
-            CloudType& owner,
-            const dimensionedVector& g
-        );
+        ThermoSurfaceFilm(const dictionary& dict, CloudType& owner);
 
         //- Construct copy
         ThermoSurfaceFilm(const ThermoSurfaceFilm<CloudType>& sfm);
diff --git a/wmake/rules/linux64Gcc47/c++Opt b/wmake/rules/linux64Gcc47/c++Opt
index 1c64f5b4b75c972929be0c9aab0a7fb94e94a9c2..2aedabd6280a3476bc58db13139a0a3aa579502b 100644
--- a/wmake/rules/linux64Gcc47/c++Opt
+++ b/wmake/rules/linux64Gcc47/c++Opt
@@ -1,2 +1,2 @@
 c++DBUG     =
-c++OPT      = -O2
+c++OPT      = -O3
diff --git a/wmake/rules/linux64Gcc47/cOpt b/wmake/rules/linux64Gcc47/cOpt
index 6650ffa4a5d5bc79ba993a4087d2c1bc26c6d81d..17318709f1fa39e6bf89cbe87778bc6fa459de17 100644
--- a/wmake/rules/linux64Gcc47/cOpt
+++ b/wmake/rules/linux64Gcc47/cOpt
@@ -1,2 +1,2 @@
 cDBUG       =
-cOPT        = -O2
+cOPT        = -O3
diff --git a/wmake/rules/linuxGcc47/c b/wmake/rules/linuxGcc47/c
new file mode 100644
index 0000000000000000000000000000000000000000..d914fcd37d084b82a1833722d6ad7a0db3dd1c93
--- /dev/null
+++ b/wmake/rules/linuxGcc47/c
@@ -0,0 +1,16 @@
+.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/linuxGcc47/c++ b/wmake/rules/linuxGcc47/c++
new file mode 100644
index 0000000000000000000000000000000000000000..357f4106e10d7d1108a6713802e6f0d01cd8be9a
--- /dev/null
+++ b/wmake/rules/linuxGcc47/c++
@@ -0,0 +1,21 @@
+.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 -Xlinker --add-needed -Xlinker --no-as-needed
+LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed
diff --git a/wmake/rules/linuxGcc47/c++Debug b/wmake/rules/linuxGcc47/c++Debug
new file mode 100644
index 0000000000000000000000000000000000000000..19bdb9c3346fc7a69380dfedd6e7911fe220a965
--- /dev/null
+++ b/wmake/rules/linuxGcc47/c++Debug
@@ -0,0 +1,2 @@
+c++DBUG    = -ggdb3 -DFULLDEBUG
+c++OPT      = -O0 -fdefault-inline
diff --git a/wmake/rules/linuxGcc47/c++Opt b/wmake/rules/linuxGcc47/c++Opt
new file mode 100644
index 0000000000000000000000000000000000000000..2aedabd6280a3476bc58db13139a0a3aa579502b
--- /dev/null
+++ b/wmake/rules/linuxGcc47/c++Opt
@@ -0,0 +1,2 @@
+c++DBUG     =
+c++OPT      = -O3
diff --git a/wmake/rules/linuxGcc47/c++Prof b/wmake/rules/linuxGcc47/c++Prof
new file mode 100644
index 0000000000000000000000000000000000000000..3bda4dad55e898a8198f6e8bfe21e8d829d7230a
--- /dev/null
+++ b/wmake/rules/linuxGcc47/c++Prof
@@ -0,0 +1,2 @@
+c++DBUG    = -pg
+c++OPT     = -O2
diff --git a/wmake/rules/linuxGcc47/cDebug b/wmake/rules/linuxGcc47/cDebug
new file mode 100644
index 0000000000000000000000000000000000000000..72b638f458220e329d52b59e3566a3c807101f9d
--- /dev/null
+++ b/wmake/rules/linuxGcc47/cDebug
@@ -0,0 +1,2 @@
+cDBUG       = -ggdb -DFULLDEBUG
+cOPT        = -O1 -fdefault-inline -finline-functions
diff --git a/wmake/rules/linuxGcc47/cOpt b/wmake/rules/linuxGcc47/cOpt
new file mode 100644
index 0000000000000000000000000000000000000000..17318709f1fa39e6bf89cbe87778bc6fa459de17
--- /dev/null
+++ b/wmake/rules/linuxGcc47/cOpt
@@ -0,0 +1,2 @@
+cDBUG       =
+cOPT        = -O3
diff --git a/wmake/rules/linuxGcc47/cProf b/wmake/rules/linuxGcc47/cProf
new file mode 100644
index 0000000000000000000000000000000000000000..ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7
--- /dev/null
+++ b/wmake/rules/linuxGcc47/cProf
@@ -0,0 +1,2 @@
+cDBUG       = -pg
+cOPT        = -O2
diff --git a/wmake/rules/linuxGcc47/general b/wmake/rules/linuxGcc47/general
new file mode 100644
index 0000000000000000000000000000000000000000..4b051e6b9840df29cac2e8ced14c7d18b0b337d5
--- /dev/null
+++ b/wmake/rules/linuxGcc47/general
@@ -0,0 +1,9 @@
+CPP        = cpp -traditional-cpp
+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/linuxGcc47/mplibHPMPI b/wmake/rules/linuxGcc47/mplibHPMPI
new file mode 100644
index 0000000000000000000000000000000000000000..8aff40632bd23af9607d63c4eb675a8de0cd287c
--- /dev/null
+++ b/wmake/rules/linuxGcc47/mplibHPMPI
@@ -0,0 +1,3 @@
+PFLAGS     =
+PINC       = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
+PLIBS      = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi