Index: /issm/trunk/src/c/Makefile.am
===================================================================
--- /issm/trunk/src/c/Makefile.am	(revision 10279)
+++ /issm/trunk/src/c/Makefile.am	(revision 10280)
@@ -19,721 +19,7 @@
 #}}}
 
-#For serial compilation
-#ISSM serial library{{{1
-libISSM_a_SOURCES = ./include/macros.h\
-					./include/typedefs.h\
-					./include/types.h\
-					./include/globals.h\
-					./include/include.h\
-					./objects/objects.h\
-					./objects/Object.h\
-					./objects/Bamg/BamgGeom.h\
-					./objects/Bamg/BamgGeom.cpp\
-					./objects/Bamg/BamgMesh.h\
-					./objects/Bamg/BamgMesh.cpp\
-					./objects/Bamg/BamgOpts.h\
-					./objects/Bamg/BamgOpts.cpp\
-					./objects/Bamg/CrackedEdge.h\
-					./objects/Bamg/CrackedEdge.cpp\
-					./objects/Bamg/Curve.h\
-					./objects/Bamg/Curve.cpp\
-					./objects/Bamg/Direction.h\
-					./objects/Bamg/Direction.cpp\
-					./objects/Bamg/DoubleAndInt.h\
-					./objects/Bamg/Edge.h\
-					./objects/Bamg/Edge.cpp\
-					./objects/Bamg/GeomEdge.h\
-					./objects/Bamg/GeomEdge.cpp\
-					./objects/Bamg/GeomSubDomain.h\
-					./objects/Bamg/GeomSubDomain.cpp\
-					./objects/Bamg/GeomVertex.h\
-					./objects/Bamg/GeomVertex.cpp\
-					./objects/Bamg/Geometry.cpp\
-					./objects/Bamg/Geometry.h\
-					./objects/Bamg/ListofIntersectionTriangles.cpp\
-					./objects/Bamg/ListofIntersectionTriangles.h\
-					./objects/Bamg/EigenMetric.cpp\
-					./objects/Bamg/Metric.cpp\
-					./objects/Bamg/Metric.h\
-					./objects/Bamg/QuadTree.cpp\
-					./objects/Bamg/QuadTree.h\
-					./objects/Bamg/R2.h\
-					./objects/Bamg/SetOfE4.cpp\
-					./objects/Bamg/SetOfE4.h\
-					./objects/Bamg/SubDomain.h\
-					./objects/Bamg/SubDomain.cpp\
-					./objects/Bamg/AdjacentTriangle.h\
-					./objects/Bamg/AdjacentTriangle.cpp\
-					./objects/Bamg/Triangle.cpp\
-					./objects/Bamg/Triangle.h\
-					./objects/Bamg/BamgVertex.cpp\
-					./objects/Bamg/BamgVertex.h\
-					./objects/Bamg/VertexOnEdge.h\
-					./objects/Bamg/VertexOnEdge.cpp\
-					./objects/Bamg/VertexOnGeom.h\
-					./objects/Bamg/VertexOnGeom.cpp\
-					./objects/Bamg/VertexOnVertex.h\
-					./objects/Bamg/VertexOnVertex.cpp\
-					./objects/Bamg/Mesh.cpp\
-					./objects/Bamg/Mesh.h\
-					./objects/KML/KML_Attribute.cpp\
-					./objects/KML/KML_Attribute.h\
-					./objects/KML/KML_ColorStyle.cpp\
-					./objects/KML/KML_ColorStyle.h\
-					./objects/KML/KML_Container.cpp\
-					./objects/KML/KML_Container.h\
-					./objects/KML/KML_Document.cpp\
-					./objects/KML/KML_Document.h\
-					./objects/KML/KML_Feature.cpp\
-					./objects/KML/KML_Feature.h\
-					./objects/KML/KML_File.cpp\
-					./objects/KML/KML_File.h\
-					./objects/KML/KML_Folder.cpp\
-					./objects/KML/KML_Folder.h\
-					./objects/KML/KML_Geometry.cpp\
-					./objects/KML/KML_Geometry.h\
-					./objects/KML/KML_GroundOverlay.cpp\
-					./objects/KML/KML_GroundOverlay.h\
-					./objects/KML/KML_Icon.cpp\
-					./objects/KML/KML_Icon.h\
-					./objects/KML/KML_LatLonBox.cpp\
-					./objects/KML/KML_LatLonBox.h\
-					./objects/KML/KML_LinearRing.cpp\
-					./objects/KML/KML_LinearRing.h\
-					./objects/KML/KML_LineString.cpp\
-					./objects/KML/KML_LineString.h\
-					./objects/KML/KML_LineStyle.cpp\
-					./objects/KML/KML_LineStyle.h\
-					./objects/KML/KML_MultiGeometry.cpp\
-					./objects/KML/KML_MultiGeometry.h\
-					./objects/KML/KML_Object.cpp\
-					./objects/KML/KML_Object.h\
-					./objects/KML/KML_Overlay.cpp\
-					./objects/KML/KML_Overlay.h\
-					./objects/KML/KML_Point.cpp\
-					./objects/KML/KML_Point.h\
-					./objects/KML/KML_Placemark.cpp\
-					./objects/KML/KML_Placemark.h\
-					./objects/KML/KML_Polygon.cpp\
-					./objects/KML/KML_Polygon.h\
-					./objects/KML/KML_PolyStyle.cpp\
-					./objects/KML/KML_PolyStyle.h\
-					./objects/KML/KML_Style.cpp\
-					./objects/KML/KML_Style.h\
-					./objects/KML/KML_StyleSelector.cpp\
-					./objects/KML/KML_StyleSelector.h\
-					./objects/KML/KML_SubStyle.cpp\
-					./objects/KML/KML_SubStyle.h\
-					./objects/KML/KMLFileReadUtils.cpp\
-					./objects/KML/KMLFileReadUtils.h\
-					./objects/Options/Option.cpp\
-					./objects/Options/Option.h\
-					./objects/Options/OptionDouble.cpp\
-					./objects/Options/OptionDouble.h\
-					./objects/Options/OptionLogical.cpp\
-					./objects/Options/OptionLogical.h\
-					./objects/Options/OptionChar.cpp\
-					./objects/Options/OptionChar.h\
-					./objects/Options/OptionStruct.cpp\
-					./objects/Options/OptionStruct.h\
-					./objects/Options/OptionCell.cpp\
-					./objects/Options/OptionCell.h\
-					./objects/Options/OptionUtilities.cpp\
-					./objects/Options/OptionUtilities.h\
-					./objects/Gauss/GaussTria.h\
-					./objects/Gauss/GaussTria.cpp\
-					./objects/Gauss/GaussPenta.h\
-					./objects/Gauss/GaussPenta.cpp\
-					./objects/Update.h\
-					./objects/Element.h\
-					./objects/FemModel.h\
-					./objects/FemModel.cpp\
-					./objects/Material.h\
-					./objects/Load.h\
-					./objects/OptArgs.h\
-					./objects/OptPars.h\
-					./objects/Contour.h\
-					./objects/Contour.cpp\
-					./objects/Loads/Friction.h\
-					./objects/Loads/Friction.cpp\
-					./objects/Node.h\
-					./objects/Node.cpp\
-					./objects/Segment.h\
-					./objects/Segment.cpp\
-					./objects/Vertex.h\
-					./objects/Vertex.cpp\
-					./objects/Hook.h\
-					./objects/Hook.cpp\
-					./objects/Patch.h\
-					./objects/Patch.cpp\
-					./objects/DofIndexing.h\
-					./objects/DofIndexing.cpp\
-					./objects/IoModel.h\
-					./objects/IoModel.cpp\
-					./objects/ElementResults/ElementResultLocal.h\
-					./objects/ElementResults/DoubleElementResult.h\
-					./objects/ElementResults/DoubleElementResult.cpp\
-					./objects/ElementResults/TriaVertexElementResult.h\
-					./objects/ElementResults/TriaVertexElementResult.cpp\
-					./objects/ElementResults/PentaVertexElementResult.h\
-					./objects/ElementResults/PentaVertexElementResult.cpp\
-					./objects/ElementResults/BoolElementResult.h\
-					./objects/ElementResults/BoolElementResult.cpp\
-					./objects/ExternalResults/ExternalResult.h\
-					./objects/ExternalResults/BoolExternalResult.h\
-					./objects/ExternalResults/BoolExternalResult.cpp\
-					./objects/ExternalResults/DoubleExternalResult.h\
-					./objects/ExternalResults/DoubleExternalResult.cpp\
-					./objects/ExternalResults/DoubleVecExternalResult.h\
-					./objects/ExternalResults/DoubleVecExternalResult.cpp\
-					./objects/ExternalResults/DoubleMatExternalResult.h\
-					./objects/ExternalResults/DoubleMatExternalResult.cpp\
-					./objects/ExternalResults/IntExternalResult.h\
-					./objects/ExternalResults/IntExternalResult.cpp\
-					./objects/ExternalResults/StringExternalResult.h\
-					./objects/ExternalResults/StringExternalResult.cpp\
-					./objects/ExternalResults/PetscVecExternalResult.h\
-					./objects/ExternalResults/PetscVecExternalResult.cpp\
-					./objects/Elements/Tria.h\
-					./objects/Elements/Tria.cpp\
-					./objects/Elements/TriaHook.h\
-					./objects/Elements/TriaHook.cpp\
-					./objects/Elements/TriaRef.h\
-					./objects/Elements/TriaRef.cpp\
-					./objects/Inputs/Input.h\
-					./objects/Inputs/InputLocal.h\
-					./objects/Inputs/TriaVertexInput.h\
-					./objects/Inputs/TriaVertexInput.cpp\
-					./objects/Inputs/PentaVertexInput.h\
-					./objects/Inputs/PentaVertexInput.cpp\
-					./objects/Inputs/BoolInput.h\
-					./objects/Inputs/BoolInput.cpp\
-					./objects/Inputs/IntInput.h\
-					./objects/Inputs/IntInput.cpp\
-					./objects/Inputs/DoubleInput.h\
-					./objects/Inputs/DoubleInput.cpp\
-					./objects/Inputs/ControlInput.h\
-					./objects/Inputs/ControlInput.cpp\
-					./objects/Inputs/DatasetInput.h\
-					./objects/Inputs/DatasetInput.cpp\
-					./objects/Inputs/TransientInput.h\
-					./objects/Inputs/TransientInput.cpp\
-					./objects/Elements/Penta.h\
-					./objects/Elements/Penta.cpp\
-					./objects/Elements/PentaHook.h\
-					./objects/Elements/PentaHook.cpp\
-					./objects/Elements/PentaRef.h\
-					./objects/Elements/PentaRef.cpp\
-					./objects/Materials/Matice.h\
-					./objects/Materials/Matice.cpp\
-					./objects/Materials/Matpar.h\
-					./objects/Materials/Matpar.cpp\
-					./objects/Constraints/Constraint.h\
-					./objects/Constraints/SpcStatic.cpp\
-					./objects/Constraints/SpcStatic.h\
-					./objects/Constraints/SpcDynamic.cpp\
-					./objects/Constraints/SpcDynamic.h\
-					./objects/Constraints/SpcTransient.cpp\
-					./objects/Constraints/SpcTransient.h\
-					./objects/Loads/Penpair.cpp\
-					./objects/Loads/Penpair.h\
-					./objects/Loads/Pengrid.cpp\
-					./objects/Loads/Pengrid.h\
-					./objects/Loads/Icefront.cpp\
-					./objects/Loads/Icefront.h\
-					./objects/Loads/Riftfront.cpp\
-					./objects/Loads/Riftfront.h\
-					./objects/Loads/Numericalflux.cpp\
-					./objects/Loads/Numericalflux.h\
-					./objects/Numerics/ElementMatrix.h\
-					./objects/Numerics/ElementMatrix.cpp\
-					./objects/Numerics/ElementVector.h\
-					./objects/Numerics/ElementVector.cpp\
-					./objects/Params/Param.h\
-					./objects/Params/BoolParam.cpp\
-					./objects/Params/BoolParam.h\
-					./objects/Params/IntParam.cpp\
-					./objects/Params/IntParam.h\
-					./objects/Params/IntVecParam.cpp\
-					./objects/Params/IntVecParam.h\
-					./objects/Params/IntMatParam.cpp\
-					./objects/Params/IntMatParam.h\
-					./objects/Params/DoubleParam.cpp\
-					./objects/Params/DoubleParam.h\
-					./objects/Params/FileParam.cpp\
-					./objects/Params/FileParam.h\
-					./objects/Params/PetscMatParam.cpp\
-					./objects/Params/PetscMatParam.h\
-					./objects/Params/StringArrayParam.cpp\
-					./objects/Params/StringArrayParam.h\
-					./objects/Params/DoubleMatParam.cpp\
-					./objects/Params/DoubleMatParam.h\
-					./objects/Params/DoubleMatArrayParam.cpp\
-					./objects/Params/DoubleMatArrayParam.h\
-					./objects/Params/DoubleVecParam.cpp\
-					./objects/Params/DoubleVecParam.h\
-					./objects/Params/PetscVecParam.cpp\
-					./objects/Params/PetscVecParam.h\
-					./objects/Params/StringParam.cpp\
-					./objects/Params/StringParam.h\
-					./Container/Container.h\
-					./Container/Constraints.h\
-					./Container/Constraints.cpp\
-					./Container/DataSet.h\
-					./Container/DataSet.cpp\
-					./Container/Elements.h\
-					./Container/Elements.cpp\
-					./Container/Inputs.h\
-					./Container/Inputs.cpp\
-					./Container/Loads.h\
-					./Container/Loads.cpp\
-					./Container/Materials.h\
-					./Container/Materials.cpp\
-					./Container/Nodes.h\
-					./Container/Nodes.cpp\
-					./Container/Options.h\
-					./Container/Options.cpp\
-					./Container/Parameters.h\
-					./Container/Parameters.cpp\
-					./Container/Results.h\
-					./Container/Results.cpp\
-					./Container/Vertices.h\
-					./Container/Vertices.cpp\
-					./shared/shared.h\
-					./shared/Alloc/alloc.h\
-					./shared/Alloc/alloc.cpp\
-					./shared/Threads/issm_threads.h\
-					./shared/Threads/LaunchThread.cpp\
-					./shared/Threads/PartitionRange.cpp\
-					./shared/Matlab/matlabshared.h\
-					./shared/Matlab/ModuleBoot.cpp\
-					./shared/Matlab/ModuleEnd.cpp\
-					./shared/Matlab/mxGetAssignedField.cpp\
-					./shared/Matlab/mxGetField.cpp\
-					./shared/Matlab/CheckNumMatlabArguments.cpp\
-					./shared/Matrix/matrix.h\
-					./shared/Matrix/MatrixUtils.cpp\
-					./shared/Dofs/dofs.h\
-					./shared/Dofs/dofsetgen.cpp\
-					./shared/Numerics/numerics.h\
-					./shared/Numerics/isnan.h\
-					./shared/Numerics/isnan.cpp\
-					./shared/Numerics/Verbosity.h\
-					./shared/Numerics/Verbosity.cpp\
-					./shared/Numerics/IsInputConverged.cpp\
-					./shared/Numerics/GaussPoints.h\
-					./shared/Numerics/cross.cpp\
-					./shared/Numerics/GaussPoints.cpp\
-					./shared/Numerics/BrentSearch.cpp\
-					./shared/Numerics/OptimalSearch.cpp\
-					./shared/Numerics/OptFunc.cpp\
-					./shared/Numerics/extrema.cpp\
-					./shared/Numerics/UnitConversion.cpp\
-					./shared/Numerics/PetscOptionsFromAnalysis.cpp\
-					./shared/Exceptions/exceptions.h\
-					./shared/Exceptions/Exceptions.cpp\
-					./shared/Exceptions/exprintf.cpp\
-					./shared/Exp/exp.h\
-					./shared/Exp/IsInPoly.cpp\
-					./shared/Exp/IsInPolySerial.cpp\
-					./shared/Exp/DomainOutlineRead.cpp\
-					./shared/Exp/DomainOutlineWrite.cpp\
-					./shared/TriMesh/trimesh.h\
-					./shared/TriMesh/AssociateSegmentToElement.cpp\
-					./shared/TriMesh/GridInsideHole.cpp\
-					./shared/TriMesh/OrderSegments.cpp\
-					./shared/TriMesh/SplitMeshForRifts.cpp\
-					./shared/TriMesh/TriMeshUtils.cpp\
-					./shared/Sorting/binary_search.cpp\
-					./shared/Sorting/sorting.h\
-					./shared/Elements/elements.h\
-					./shared/Elements/Paterson.cpp\
-					./shared/Elements/Arrhenius.cpp\
-					./shared/Elements/GetVerticesCoordinates.cpp\
-					./shared/Elements/GetLocalDofList.cpp\
-					./shared/Elements/GetGlobalDofList.cpp\
-					./shared/Elements/GetNumberOfDofs.cpp\
-					./shared/String/sharedstring.h\
-					./shared/Bamg/Abs.h \
-					./shared/Bamg/BigPrimeNumber.h\
-					./shared/Bamg/BigPrimeNumber.cpp\
-					./shared/Bamg/BinaryRand.h \
-					./shared/Bamg/det.h \
-					./shared/Bamg/Exchange.h \
-					./shared/Bamg/extrema.h \
-					./shared/Bamg/HeapSort.h \
-					./shared/Bamg/OppositeAngle.h \
-					./toolkits/petsc\
-					./toolkits/petsc/patches\
-					./toolkits/petsc/patches/SolverEnum.h\
-					./toolkits/petsc/patches/petscpatches.h\
-					./toolkits/petsc/patches/MatlabMatrixToPetscMatrix.cpp\
-					./toolkits/petsc/patches/MatlabVectorToPetscVector.cpp\
-					./toolkits/petsc/patches/PetscMatrixToMatlabMatrix.cpp\
-					./toolkits/petsc/patches/PetscVectorToMatlabVector.cpp\
-					./toolkits/petsc/patches/MatlabMatrixToDoubleMatrix.cpp\
-					./toolkits/petsc/patches/MatlabVectorToDoubleVector.cpp\
-					./toolkits/petsc/patches/PetscDetermineLocalSize.cpp\
-					./toolkits/petsc/patches/VecTranspose.cpp\
-					./toolkits/petsc/patches/VecToMPISerial.cpp\
-					./toolkits/petsc/patches/MatToSerial.cpp\
-					./toolkits/petsc/patches/VecMerge.cpp\
-					./toolkits/petsc/patches/NewVec.cpp\
-					./toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp\
-					./toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp\
-					./toolkits/petsc/patches/NewMat.cpp\
-					./toolkits/petsc/patches/SerialToVec.cpp\
-					./toolkits/petsc/patches/VecFree.cpp\
-					./toolkits/petsc/patches/VecDuplicatePatch.cpp\
-					./toolkits/petsc/patches/KSPFree.cpp\
-					./toolkits/petsc/patches/ISFree.cpp\
-					./toolkits/petsc/patches/MatFree.cpp\
-					./toolkits/petsc/patches/GetOwnershipBoundariesFromRange.cpp\
-					./toolkits/petsc/patches/VecPartition.cpp\
-					./toolkits/petsc/patches/MatPartition.cpp\
-					./toolkits/petsc/patches/MatInvert.cpp\
-					./toolkits/petsc/patches/MatMultPatch.cpp\
-					./toolkits/petsc/petscincludes.h\
-					./toolkits/mpi/mpiincludes.h\
-					./toolkits/mpi/patches/mpipatches.h\
-					./toolkits/mpi/patches/MPI_Upperrow.cpp\
-					./toolkits/mpi/patches/MPI_Lowerrow.cpp\
-					./toolkits/mpi/patches/MPI_Boundariesfromrange.cpp\
-					./toolkits/metis/metisincludes.h\
-					./toolkits/metis/patches/metispatches.h\
-					./toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp\
-					./toolkits/triangle/triangleincludes.h\
-					./toolkits/matlab/matlabincludes.h\
-					./toolkits/matlab/MatlabNArrayToNArray.cpp\
-					./toolkits.h\
-					./io/io.h\
-					./io/Disk/diskio.h\
-					./io/Disk/pfopen.cpp\
-					./io/Disk/pfclose.cpp\
-					./io/Matlab/matlabio.h\
-					./io/Matlab/WriteMatlabData.cpp\
-					./io/Matlab/FetchMatlabData.cpp\
-					./io/Matlab/OptionParse.cpp\
-					./io/PrintfFunction.cpp\
-					./EnumDefinitions/EnumDefinitions.h\
-					./EnumDefinitions/EnumToModelField.cpp\
-					./modules/AddExternalResultx/AddExternalResultx.h\
-					./modules/AddExternalResultx/AddExternalResultx.cpp\
-					./modules/Chacox/Chacox.h\
-					./modules/Chacox/Chacox.cpp\
-					./modules/Chacox/input_parse.cpp\
-					./modules/Chacox/chaco_seconds.cpp\
-					./modules/Chacox/user_params.cpp\
-					./modules/GroundingLineMigrationx/GroundingLineMigrationx.cpp\
-					./modules/GroundingLineMigrationx/GroundingLineMigrationx.h\
-					./modules/GroundingLineMigrationx/GroundingLineMigrationxLocal.h\
-					./modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp\
-					./modules/ModelProcessorx/ModelProcessorx.h\
-					./modules/ModelProcessorx/ModelProcessorx.cpp\
-					./modules/ModelProcessorx/DistributeNumDofs.cpp\
-					./modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp\
-					./modules/ModelProcessorx/NodesPartitioning.cpp\
-					./modules/ModelProcessorx/SortDataSets.cpp\
-					./modules/ModelProcessorx/UpdateCounters.cpp\
-					./modules/ModelProcessorx/CreateDataSets.cpp\
-					./modules/ModelProcessorx/CreateParameters.cpp\
-					./modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp\
-					./modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp\
-					./modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp\
-					./modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp\
-					./modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp \
-					./modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp \
-					./modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp\
-					./modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp\
-					./modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp \
-					./modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp \
-					./modules/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp\
-					./modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp\
-					./modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp \
-					./modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp \
-					./modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp\
-					./modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp\
-					./modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp \
-					./modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp\
-					./modules/ModelProcessorx/BedSlope/CreateLoadsBedSlope.cpp\
-					./modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp\
-					./modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp \
-					./modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp\
-					./modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp\
-					./modules/ModelProcessorx/Control/CreateParametersControl.cpp\
-					./modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp\
-					./modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp\
-					./modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp\
-					./modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp\
-					./modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp\
-					./modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp\
-					./modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp\
-					./modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp\
-					./modules/ModelProcessorx/Enthalpy/CreateLoadsEnthalpy.cpp\
-					./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\
-					./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\
-					./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\
-					./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp\
-					./modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp\
-					./modules/ModelProcessorx/Melting/CreateNodesMelting.cpp\
-					./modules/ModelProcessorx/Melting/CreateConstraintsMelting.cpp\
-					./modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp\
-					./modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp\
-					./modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\
-					./modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp\
-					./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp\
-					./modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp\
-					./modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp\
-					./modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp\
-					./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp\
-					./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp\
-					./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\
-					./modules/ParsePetscOptionsx/ParsePetscOptionsx.h\
-					./modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp\
-					./modules/NodesDofx/NodesDofx.h\
-					./modules/NodesDofx/NodesDofx.cpp\
-					./modules/NodalValuex/NodalValuex.h\
-					./modules/NodalValuex/NodalValuex.cpp\
-					./modules/TriaSearchx/TriaSearchx.h\
-					./modules/TriaSearchx/TriaSearchx.cpp\
-					./modules/VerticesDofx/VerticesDofx.h\
-					./modules/VerticesDofx/VerticesDofx.cpp\
-					./modules/OutputResultsx/OutputResultsx.h\
-					./modules/OutputResultsx/OutputResultsx.cpp\
-					./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.h\
-					./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.cpp\
-					./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp\
-					./modules/MinVelx/MinVelx.h\
-					./modules/MinVelx/MinVelx.cpp\
-					./modules/MaxVelx/MaxVelx.h\
-					./modules/MaxVelx/MaxVelx.cpp\
-					./modules/MaxAbsVxx/MaxAbsVxx.h\
-					./modules/MaxAbsVxx/MaxAbsVxx.cpp\
-					./modules/MaxAbsVyx/MaxAbsVyx.h\
-					./modules/MaxAbsVyx/MaxAbsVyx.cpp\
-					./modules/MaxAbsVzx/MaxAbsVzx.h\
-					./modules/MaxAbsVzx/MaxAbsVzx.cpp\
-					./modules/MaxVxx/MaxVxx.h\
-					./modules/MaxVxx/MaxVxx.cpp\
-					./modules/MaxVyx/MaxVyx.h\
-					./modules/MaxVyx/MaxVyx.cpp\
-					./modules/MaxVzx/MaxVzx.h\
-					./modules/MaxVzx/MaxVzx.cpp\
-					./modules/MinVxx/MinVxx.h\
-					./modules/MinVxx/MinVxx.cpp\
-					./modules/MinVyx/MinVyx.h\
-					./modules/MinVyx/MinVyx.cpp\
-					./modules/MinVzx/MinVzx.h\
-					./modules/MinVzx/MinVzx.cpp\
-					./modules/KMLMeshWritex/KMLFileReadx.h\
-					./modules/KMLMeshWritex/KMLFileReadx.cpp\
-					./modules/KMLMeshWritex/KMLMeshWritex.h\
-					./modules/KMLMeshWritex/KMLMeshWritex.cpp\
-					./modules/KMLOverlayx/KMLOverlayx.h\
-					./modules/KMLOverlayx/KMLOverlayx.cpp\
-					./modules/Xy2llx/Xy2llx.h\
-					./modules/Xy2llx/Xy2llx.cpp\
-					./modules/Ll2xyx/Ll2xyx.h\
-					./modules/Ll2xyx/Ll2xyx.cpp\
-					./modules/Exp2Kmlx/Exp2Kmlx.h\
-					./modules/Exp2Kmlx/Exp2Kmlx.cpp\
-					./modules/Kml2Expx/Kml2Expx.h\
-					./modules/Kml2Expx/Kml2Expx.cpp\
-					./modules/Shp2Kmlx/Shp2Kmlx.h\
-					./modules/Shp2Kmlx/Shp2Kmlx.cpp\
-					./modules/InputDuplicatex/InputDuplicatex.h\
-					./modules/InputDuplicatex/InputDuplicatex.cpp\
-					./modules/InputScalex/InputScalex.h\
-					./modules/InputScalex/InputScalex.cpp\
-					./modules/InputControlUpdatex/InputControlUpdatex.h\
-					./modules/InputControlUpdatex/InputControlUpdatex.cpp\
-					./modules/SurfaceAreax/SurfaceAreax.h\
-					./modules/SurfaceAreax/SurfaceAreax.cpp\
-					./modules/IceVolumex/IceVolumex.h\
-					./modules/IceVolumex/IceVolumex.cpp\
-					./modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.h\
-					./modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp\
-					./modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.h\
-					./modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp\
-					./modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.h\
-					./modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp\
-					./modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.h\
-					./modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp\
-					./modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.h\
-					./modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp\
-					./modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.h\
-					./modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp\
-					./modules/CostFunctionx/CostFunctionx.h\
-					./modules/CostFunctionx/CostFunctionx.cpp\
-					./modules/CreateNodalConstraintsx/CreateNodalConstraintsx.h\
-					./modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp\
-					./modules/Orthx/Orthx.h\
-					./modules/Orthx/Orthx.cpp\
-					./modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.h\
-					./modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp\
-					./modules/Gradjx/Gradjx.h\
-					./modules/Gradjx/Gradjx.cpp\
-					./modules/IoModelToConstraintsx/IoModelToConstraintsx.h\
-					./modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp\
-					./modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h\
-					./modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp\
-					./modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.h\
-					./modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp\
-					./modules/GetSolutionFromInputsx/GetSolutionFromInputsx.h\
-					./modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp\
-					./modules/GetVectorFromInputsx/GetVectorFromInputsx.h\
-					./modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp\
-					./modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h\
-					./modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp\
-					./modules/InputArtificialNoisex/InputArtificialNoisex.h\
-					./modules/InputArtificialNoisex/InputArtificialNoisex.cpp\
-					./modules/TimeAdaptx/TimeAdaptx.h\
-					./modules/TimeAdaptx/TimeAdaptx.cpp\
-					./modules/UpdateVertexPositionsx/UpdateVertexPositionsx.h\
-					./modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp\
-					./modules/ConfigureObjectsx/ConfigureObjectsx.h\
-					./modules/ConfigureObjectsx/ConfigureObjectsx.cpp\
-					./modules/ComputeBasalStressx/ComputeBasalStressx.h\
-					./modules/ComputeBasalStressx/ComputeBasalStressx.cpp\
-					./modules/ComputeStrainRatex/ComputeStrainRatex.h\
-					./modules/ComputeStrainRatex/ComputeStrainRatex.cpp\
-					./modules/SpcNodesx/SpcNodesx.h\
-					./modules/SpcNodesx/SpcNodesx.cpp\
-					./modules/UpdateConstraintsx/UpdateConstraintsx.h\
-					./modules/UpdateConstraintsx/UpdateConstraintsx.cpp\
-					./modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp\
-					./modules/InterpFromGridToMeshx/InterpFromGridToMeshx.h\
-					./modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp\
-					./modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp\
-					./modules/InterpFromMesh2dx/InterpFromMesh2dx.h\
-					./modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp\
-					./modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h\
-					./modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp\
-					./modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.h\
-					./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp\
-					./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.h\
-					./modules/HoleFillerx/HoleFillerx.cpp\
-					./modules/HoleFillerx/HoleFillerx.h\
-					./modules/AverageFilterx/AverageFilterx.cpp\
-					./modules/AverageFilterx/AverageFilterx.h\
-					./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
-					./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
-					./modules/MeshPartitionx/MeshPartitionx.cpp\
-					./modules/MeshPartitionx/MeshPartitionx.h\
-					./modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp\
-					./modules/MeshProfileIntersectionx/MeshProfileIntersectionx.h\
-					./modules/MeshProfileIntersectionx/MeshSegmentsIntersection.cpp\
-					./modules/MeshProfileIntersectionx/ElementSegmentsIntersection.cpp\
-					./modules/MeshProfileIntersectionx/ElementSegment.cpp\
-					./modules/MeshProfileIntersectionx/SegmentIntersect.cpp\
-					./modules/MeshProfileIntersectionx/NodeInElement.cpp\
-					./modules/ContourToMeshx/ContourToMeshx.cpp\
-					./modules/ContourToMeshx/ContourToMeshxt.cpp\
-					./modules/ContourToMeshx/ContourToMeshx.h\
-					./modules/ContourToNodesx/ContourToNodesx.cpp\
-					./modules/ContourToNodesx/ContourToNodesx.h\
-					./modules/Reducevectorgtosx/Reducevectorgtosx.cpp\
-					./modules/Reducevectorgtosx/Reducevectorgtosx.h\
-					./modules/Reducevectorgtofx/Reducevectorgtofx.cpp\
-					./modules/Reducevectorgtofx/Reducevectorgtofx.h\
-					./modules/Reduceloadx/Reduceloadx.h\
-					./modules/Reduceloadx/Reduceloadx.cpp\
-					./modules/NodeConnectivityx/NodeConnectivityx.cpp\
-					./modules/NodeConnectivityx/NodeConnectivityx.h\
-					./modules/ElementConnectivityx/ElementConnectivityx.cpp\
-					./modules/ElementConnectivityx/ElementConnectivityx.h\
-					./modules/EnumToStringx/EnumToStringx.cpp\
-					./modules/EnumToStringx/EnumToStringx.h\
-					./modules/StringToEnumx/StringToEnumx.cpp\
-					./modules/StringToEnumx/StringToEnumx.h\
-					./modules/MassFluxx/MassFluxx.cpp\
-					./modules/MassFluxx/MassFluxx.h\
-					./modules/ControlInputGetGradientx/ControlInputGetGradientx.cpp\
-					./modules/ControlInputGetGradientx/ControlInputGetGradientx.h\
-					./modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp\
-					./modules/ControlInputSetGradientx/ControlInputSetGradientx.h\
-					./modules/ControlInputScaleGradientx/ControlInputScaleGradientx.cpp\
-					./modules/ControlInputScaleGradientx/ControlInputScaleGradientx.h\
-					./modules/SystemMatricesx/SystemMatricesx.cpp\
-					./modules/SystemMatricesx/SystemMatricesx.h\
-					./modules/ConstraintsStatex/ConstraintsStatex.cpp\
-					./modules/ConstraintsStatex/ConstraintsStatex.h\
-					./modules/ConstraintsStatex/ConstraintsStateLocal.h\
-					./modules/ConstraintsStatex/RiftConstraintsState.cpp\
-					./modules/ConstraintsStatex/ThermalConstraintsState.cpp\
-					./modules/ConstraintsStatex/ThermalIsPresent.cpp\
-					./modules/Responsex/Responsex.h\
-					./modules/Responsex/Responsex.cpp\
-					./modules/RequestedOutputsx/RequestedOutputsx.h\
-					./modules/RequestedOutputsx/RequestedOutputsx.cpp\
-					./modules/ResetConstraintsx/ResetConstraintsx.h\
-					./modules/ResetConstraintsx/ResetConstraintsx.cpp\
-					./modules/ResetConstraintsx/ThermalConstraintsReset.cpp\
-					./modules/Scotchx/Scotchx.cpp\
-					./modules/Scotchx/Scotchx.h\
-					./modules/Solverx/Solverx.cpp\
-					./modules/Solverx/Solverx.h\
-					./modules/VecMergex/VecMergex.cpp\
-					./modules/VecMergex/VecMergex.h\
-					./modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp\
-					./modules/Mergesolutionfromftogx/Mergesolutionfromftogx.h\
-					./modules/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.cpp\
-					./modules/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.h\
-					./modules/InputToResultx/InputToResultx.cpp\
-					./modules/InputToResultx/InputToResultx.h\
-					./modules/InputConvergencex/InputConvergencex.cpp\
-					./modules/InputConvergencex/InputConvergencex.h\
-					./modules/Bamgx/Bamgx.cpp\
-					./modules/Bamgx/Bamgx.h\
-					./modules/BamgConvertMeshx/BamgConvertMeshx.cpp\
-					./modules/BamgConvertMeshx/BamgConvertMeshx.h\
-					./modules/BamgTriangulatex/BamgTriangulatex.cpp\
-					./modules/BamgTriangulatex/BamgTriangulatex.h\
-					./modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp\
-					./modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.h\
-					./modules/ThicknessAbsGradientx/ThicknessAbsGradientx.cpp\
-					./modules/ThicknessAbsGradientx/ThicknessAbsGradientx.h\
-					./modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp\
-					./modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.h\
-					./modules/RheologyBbarx/RheologyBbarx.cpp\
-					./modules/RheologyBbarx/RheologyBbarx.h
-
-
-libISSM_a_CXXFLAGS = -fPIC -DMATLAB -D_SERIAL_ -ansi -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXOPTFLAGS)
-if LARGEARRAYS
-libISSM_a_CXXFLAGS += -D__GCC4BUILD__  
-else
-libISSM_a_CXXFLAGS += -DMX_COMPAT_32 
-endif
-
-#}}}
-#DAKOTA sources  {{{1
-if DAKOTA
-libISSM_a_SOURCES +=  ./objects/DakotaPlugin.h\
-					  ./objects/DakotaPlugin.cpp\
-					  ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h\
-					  ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp\
-					  ./modules/DakotaResponsesx/DakotaResponsesx.h\
-					  ./modules/DakotaResponsesx/DakotaResponsesx.cpp\
-					  ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h\
-					  ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp\
-					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
-					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
-					  ./modules/Dakotax/Dakotax.h\
-					  ./modules/Dakotax/Dakotax.cpp\
-					  ./modules/Dakotax/DakotaMPI_Bcast.cpp\
-					  ./modules/Dakotax/DakotaFree.cpp\
-					  ./modules/Dakotax/SpawnCore.cpp\
-					  ./modules/Dakotax/SpawnCoreSerial.cpp\
-					  ./modules/Dakotax/DescriptorIndex.cpp\
-					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
-					  ./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\
-					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h
-endif
-#}}}
-
-#For parallel compilation
-#ISSM parallel library  {{{1
-libpISSM_a_SOURCES = ./include/macros.h\
+#Our sources
+#Core sources{{{1
+core_sources   =    ./include/macros.h\
 					./include/typedefs.h\
 					./include/types.h\
@@ -1061,65 +347,45 @@
 					./solvers/solver_linear.cpp\
 					./solvers/solver_nonlinear.cpp
-
-
-libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(CXXOPTFLAGS) 
-#}}}
-#Overload library, to overload any non-standard symbols. {{{1
-libOverload_a_SOURCES = ./shared/String/stricmp.c
-libOverload_a_CFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(COPTFLAGS)
 #}}}
 #DAKOTA sources  {{{1
-if DAKOTA
-libpISSM_a_SOURCES +=  ./objects/DakotaPlugin.h\
-					   ./objects/DakotaPlugin.cpp\
-					   ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h\
-					   ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp\
-					   ./modules/DakotaResponsesx/DakotaResponsesx.h\
-					   ./modules/DakotaResponsesx/DakotaResponsesx.cpp\
-					   ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h\
-					   ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp\
-					   ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
-					   ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
-					   ./modules/Dakotax/Dakotax.h\
-					   ./modules/Dakotax/Dakotax.cpp\
-					   ./modules/Dakotax/DakotaMPI_Bcast.cpp\
-					   ./modules/Dakotax/DakotaFree.cpp\
-					   ./modules/Dakotax/SpawnCore.cpp\
-					   ./modules/Dakotax/SpawnCoreParallel.cpp\
-					   ./modules/Dakotax/DescriptorIndex.cpp\
-					   ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
-					   ./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\
-					   ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h
-endif
+dakota_sources     =  ./objects/DakotaPlugin.h\
+					  ./objects/DakotaPlugin.cpp\
+					  ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h\
+					  ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp\
+					  ./modules/DakotaResponsesx/DakotaResponsesx.h\
+					  ./modules/DakotaResponsesx/DakotaResponsesx.cpp\
+					  ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h\
+					  ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp\
+					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
+					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
+					  ./modules/Dakotax/Dakotax.h\
+					  ./modules/Dakotax/Dakotax.cpp\
+					  ./modules/Dakotax/DakotaMPI_Bcast.cpp\
+					  ./modules/Dakotax/DakotaFree.cpp\
+					  ./modules/Dakotax/SpawnCore.cpp\
+					  ./modules/Dakotax/SpawnCoreSerial.cpp\
+					  ./modules/Dakotax/DescriptorIndex.cpp\
+					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
+					  ./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\
+					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h
 #}}}
 #Transient sources  {{{1
-if TRANSIENT
-libpISSM_a_SOURCES +=  ./solutions/transient_core.cpp\
-					   ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp
-endif
+transient_sources  =   ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp
+transient_psources  =   ./solutions/transient_core.cpp
 #}}}
 #Steadystate sources  {{{1
-if STEADYSTATE
-libpISSM_a_SOURCES += ./solutions/steadystate_core.cpp\
+steadystate_psources = ./solutions/steadystate_core.cpp\
 					  ./solutions/steadystateconvergence.cpp
-endif
 #}}}
 #Prognostic sources  {{{1
-if PROGNOSTIC
-libpISSM_a_SOURCES +=  ./solutions/prognostic_core.cpp\
-					   ./modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp\
+prognostic_sources =  ./modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp\
 					   ./modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\
 					   ./modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp\
 					   ./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
-
-endif
+prognostic_psources =  ./solutions/prognostic_core.cpp
+
 #}}}
 #Thermal sources  {{{1
-if THERMAL
-libpISSM_a_SOURCES +=  ./solutions/thermal_core.cpp\
-					   ./solutions/thermal_core_step.cpp\
-					   ./solutions/enthalpy_core.cpp\
-					   ./solvers/solver_thermal_nonlinear.cpp\
-					   ./modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp\
+thermal_sources =      ./modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp\
 					   ./modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp\
 					   ./modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp\
@@ -1136,19 +402,12 @@
 					   ./modules/ConstraintsStatex/ThermalIsPresent.cpp\
 					   ./modules/ResetConstraintsx/ThermalConstraintsReset.cpp
-endif
+
+thermal_psources =      ./solutions/thermal_core.cpp\
+					   ./solutions/thermal_core_step.cpp\
+					   ./solutions/enthalpy_core.cpp\
+					   ./solvers/solver_thermal_nonlinear.cpp
 #}}}
 #Control sources  {{{1
-if CONTROL
-libpISSM_a_SOURCES += ./solutions/control_core.cpp\
-					  ./solutions/controltao_core.cpp\
-					  ./solutions/controlrestart.cpp\
-					  ./solutions/controlconvergence.cpp\
-					  ./solutions/objectivefunctionC.cpp\
-					  ./solutions/gradient_core.cpp\
-					  ./solutions/adjointdiagnostic_core.cpp\
-					  ./solutions/adjointbalancethickness_core.cpp\
-					  ./solutions/AdjointCorePointerFromSolutionEnum.cpp\
-					  ./solvers/solver_adjoint_linear.cpp\
-					  ./modules/ControlInputGetGradientx/ControlInputGetGradientx.cpp\
+control_sources =     ./modules/ControlInputGetGradientx/ControlInputGetGradientx.cpp\
 					  ./modules/ControlInputGetGradientx/ControlInputGetGradientx.h\
 					  ./modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp\
@@ -1189,19 +448,28 @@
 					  ./shared/Numerics/OptimalSearch.cpp\
 					  ./shared/Numerics/OptFunc.cpp
-endif
+
+control_psources =     ./solutions/control_core.cpp\
+					  ./solutions/controltao_core.cpp\
+					  ./solutions/controlrestart.cpp\
+					  ./solutions/controlconvergence.cpp\
+					  ./solutions/objectivefunctionC.cpp\
+					  ./solutions/gradient_core.cpp\
+					  ./solutions/adjointdiagnostic_core.cpp\
+					  ./solutions/adjointbalancethickness_core.cpp\
+					  ./solutions/AdjointCorePointerFromSolutionEnum.cpp\
+					  ./solvers/solver_adjoint_linear.cpp
+
 #}}}
 #Hydrology sources  {{{1
-if HYDROLOGY
-libpISSM_a_SOURCES += ./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\
+hydrology_sources  =  ./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\
 					  ./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\
 					  ./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\
-					  ./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp\
-					  ./solutions/hydrology_core.cpp\
-					  ./solutions/hydrology_core_step.cpp
-endif
+					  ./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp
+					  
+hydrology_psources  = ./solutions/hydrology_core.cpp\
+					  ./solutions/hydrology_core_step.cpp 
 #}}}
 #Diagnostic sources  {{{1
-if DIAGNOSTIC
-libpISSM_a_SOURCES += ./modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp\
+diagnostic_sources = ./modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp\
 					  ./modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp \
 					  ./modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp \
@@ -1214,21 +482,17 @@
 					  ./modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp \
 					  ./modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp \
-					  ./modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp\
-					  ./solutions/diagnostic_core.cpp\
+					  ./modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp
+diagnostic_psources = ./solutions/diagnostic_core.cpp\
 					  ./solvers/solver_stokescoupling_nonlinear.cpp
-endif
 #}}}
 #Balanced sources  {{{1
-if BALANCED
-libpISSM_a_SOURCES += ./modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp\
+balanced_sources = ./modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp\
 					  ./modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp\
 					  ./modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp\
-					  ./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp\
-					  ./solutions/balancethickness_core.cpp
-endif
+					  ./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp
+balanced_psources = ./solutions/balancethickness_core.cpp
 #}}}
 #Responses sources  {{{1
-if RESPONSES
-libpISSM_a_SOURCES += ./modules/MinVelx/MinVelx.h\
+responses_sources =   ./modules/MinVelx/MinVelx.h\
 					  ./modules/MinVelx/MinVelx.cpp\
 					  ./modules/MaxVelx/MaxVelx.h\
@@ -1258,9 +522,7 @@
 					  ./modules/MassFluxx/MassFluxx.cpp\
 					  ./modules/MassFluxx/MassFluxx.h
-endif
 #}}}
 #Slope sources  {{{1
-if SLOPE
-libpISSM_a_SOURCES += ./modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp\
+slope_sources =       ./modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp\
 					  ./modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp \
 					  ./modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp\
@@ -1269,40 +531,357 @@
 					  ./modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp \
 					  ./modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp\
-					  ./modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp\
-					  ./solutions/surfaceslope_core.cpp\
+					  ./modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp
+slope_psources =       ./solutions/surfaceslope_core.cpp\
 					  ./solutions/bedslope_core.cpp
-endif
 #}}}
 #GroundingLine sources  {{{1
+groundingline_sources= ./modules/GroundingLineMigrationx/GroundingLineMigrationx.cpp\
+					   ./modules/GroundingLineMigrationx/GroundingLineMigrationx.h\
+					   ./modules/GroundingLineMigrationx/GroundingLineMigrationxLocal.h\
+					   ./modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp
+groundingline_psources= ./solutions/groundinglinemigration2d_core.cpp
+#}}}
+#Rifts sources  {{{1
+rifts_sources = ./objects/Loads/Riftfront.cpp\
+				./objects/Loads/Riftfront.h\
+				./modules/ConstraintsStatex/RiftConstraintsState.cpp
+#}}}
+#3D sources  {{{1
+threed_sources = ./objects/Gauss/GaussPenta.h\
+				 ./objects/Gauss/GaussPenta.cpp\
+				 ./objects/ElementResults/PentaVertexElementResult.h\
+				 ./objects/ElementResults/PentaVertexElementResult.cpp\
+				 ./objects/Inputs/PentaVertexInput.h\
+				 ./objects/Inputs/PentaVertexInput.cpp\
+				 ./objects/Elements/Penta.h\
+				 ./objects/Elements/Penta.cpp\
+				 ./objects/Elements/PentaHook.h\
+				 ./objects/Elements/PentaHook.cpp\
+				 ./objects/Elements/PentaRef.h\
+				 ./objects/Elements/PentaRef.cpp
+#}}}
+#Bamg sources  {{{1
+bamg_sources =  ./objects/Bamg/BamgGeom.h\
+				./objects/Bamg/BamgGeom.cpp\
+				./objects/Bamg/BamgMesh.h\
+				./objects/Bamg/BamgMesh.cpp\
+				./objects/Bamg/BamgOpts.h\
+				./objects/Bamg/BamgOpts.cpp\
+				./objects/Bamg/CrackedEdge.h\
+				./objects/Bamg/CrackedEdge.cpp\
+				./objects/Bamg/Curve.h\
+				./objects/Bamg/Curve.cpp\
+				./objects/Bamg/Direction.h\
+				./objects/Bamg/Direction.cpp\
+				./objects/Bamg/DoubleAndInt.h\
+				./objects/Bamg/Edge.h\
+				./objects/Bamg/Edge.cpp\
+				./objects/Bamg/GeomEdge.h\
+				./objects/Bamg/GeomEdge.cpp\
+				./objects/Bamg/GeomSubDomain.h\
+				./objects/Bamg/GeomSubDomain.cpp\
+				./objects/Bamg/GeomVertex.h\
+				./objects/Bamg/GeomVertex.cpp\
+				./objects/Bamg/Geometry.cpp\
+				./objects/Bamg/Geometry.h\
+				./objects/Bamg/ListofIntersectionTriangles.cpp\
+				./objects/Bamg/ListofIntersectionTriangles.h\
+				./objects/Bamg/EigenMetric.cpp\
+				./objects/Bamg/Metric.cpp\
+				./objects/Bamg/Metric.h\
+				./objects/Bamg/QuadTree.cpp\
+				./objects/Bamg/QuadTree.h\
+				./objects/Bamg/R2.h\
+				./objects/Bamg/SetOfE4.cpp\
+				./objects/Bamg/SetOfE4.h\
+				./objects/Bamg/SubDomain.h\
+				./objects/Bamg/SubDomain.cpp\
+				./objects/Bamg/AdjacentTriangle.h\
+				./objects/Bamg/AdjacentTriangle.cpp\
+				./objects/Bamg/Triangle.cpp\
+				./objects/Bamg/Triangle.h\
+				./objects/Bamg/BamgVertex.cpp\
+				./objects/Bamg/BamgVertex.h\
+				./objects/Bamg/VertexOnEdge.h\
+				./objects/Bamg/VertexOnEdge.cpp\
+				./objects/Bamg/VertexOnGeom.h\
+				./objects/Bamg/VertexOnGeom.cpp\
+				./objects/Bamg/VertexOnVertex.h\
+				./objects/Bamg/VertexOnVertex.cpp\
+				./objects/Bamg/Mesh.cpp\
+				./objects/Bamg/Mesh.h\
+				./shared/Bamg/Abs.h \
+				./shared/Bamg/BigPrimeNumber.h\
+				./shared/Bamg/BigPrimeNumber.cpp\
+				./shared/Bamg/BinaryRand.h \
+				./shared/Bamg/det.h \
+				./shared/Bamg/Exchange.h \
+				./shared/Bamg/extrema.h \
+				./shared/Bamg/HeapSort.h \
+				./shared/Bamg/OppositeAngle.h \
+				./modules/Bamgx/Bamgx.cpp\
+				./modules/Bamgx/Bamgx.h\
+				./modules/BamgConvertMeshx/BamgConvertMeshx.cpp\
+				./modules/BamgConvertMeshx/BamgConvertMeshx.h\
+				./modules/BamgTriangulatex/BamgTriangulatex.cpp\
+				./modules/BamgTriangulatex/BamgTriangulatex.h
+#}}}
+#Kml sources  {{{1
+kml_sources = ./modules/Exp2Kmlx/Exp2Kmlx.h\
+			  ./modules/Exp2Kmlx/Exp2Kmlx.cpp\
+			  ./modules/Kml2Expx/Kml2Expx.h\
+			  ./modules/Kml2Expx/Kml2Expx.cpp\
+			  ./modules/Shp2Kmlx/Shp2Kmlx.h\
+			  ./modules/Shp2Kmlx/Shp2Kmlx.cpp\
+			  ./objects/KML/KML_Attribute.cpp\
+			  ./objects/KML/KML_Attribute.h\
+			  ./objects/KML/KML_ColorStyle.cpp\
+			  ./objects/KML/KML_ColorStyle.h\
+			  ./objects/KML/KML_Container.cpp\
+			  ./objects/KML/KML_Container.h\
+			  ./objects/KML/KML_Document.cpp\
+			  ./objects/KML/KML_Document.h\
+			  ./objects/KML/KML_Feature.cpp\
+			  ./objects/KML/KML_Feature.h\
+			  ./objects/KML/KML_File.cpp\
+			  ./objects/KML/KML_File.h\
+			  ./objects/KML/KML_Folder.cpp\
+			  ./objects/KML/KML_Folder.h\
+			  ./objects/KML/KML_Geometry.cpp\
+			  ./objects/KML/KML_Geometry.h\
+			  ./objects/KML/KML_GroundOverlay.cpp\
+			  ./objects/KML/KML_GroundOverlay.h\
+			  ./objects/KML/KML_Icon.cpp\
+			  ./objects/KML/KML_Icon.h\
+			  ./objects/KML/KML_LatLonBox.cpp\
+		  	  ./objects/KML/KML_LatLonBox.h\
+			  ./objects/KML/KML_LinearRing.cpp\
+			  ./objects/KML/KML_LinearRing.h\
+			  ./objects/KML/KML_LineString.cpp\
+			  ./objects/KML/KML_LineString.h\
+			  ./objects/KML/KML_LineStyle.cpp\
+			  ./objects/KML/KML_LineStyle.h\
+			  ./objects/KML/KML_MultiGeometry.cpp\
+			  ./objects/KML/KML_MultiGeometry.h\
+			  ./objects/KML/KML_Object.cpp\
+			  ./objects/KML/KML_Object.h\
+			  ./objects/KML/KML_Overlay.cpp\
+			  ./objects/KML/KML_Overlay.h\
+			  ./objects/KML/KML_Point.cpp\
+			  ./objects/KML/KML_Point.h\
+			  ./objects/KML/KML_Placemark.cpp\
+			  ./objects/KML/KML_Placemark.h\
+			  ./objects/KML/KML_Polygon.cpp\
+			  ./objects/KML/KML_Polygon.h\
+			  ./objects/KML/KML_PolyStyle.cpp\
+			  ./objects/KML/KML_PolyStyle.h\
+			  ./objects/KML/KML_Style.cpp\
+			  ./objects/KML/KML_Style.h\
+			  ./objects/KML/KML_StyleSelector.cpp\
+			  ./objects/KML/KML_StyleSelector.h\
+			  ./objects/KML/KML_SubStyle.cpp\
+			  ./objects/KML/KML_SubStyle.h\
+			  ./objects/KML/KMLFileReadUtils.cpp\
+			  ./objects/KML/KMLFileReadUtils.h
+#}}}
+#Matlab sources  {{{1
+matlab_sources= ./shared/Matlab/matlabshared.h\
+				./shared/Matlab/ModuleBoot.cpp\
+				./shared/Matlab/ModuleEnd.cpp\
+				./shared/Matlab/mxGetAssignedField.cpp\
+				./shared/Matlab/mxGetField.cpp\
+				./shared/Matlab/CheckNumMatlabArguments.cpp\
+				./toolkits/matlab/matlabincludes.h\
+				./toolkits/matlab/MatlabNArrayToNArray.cpp\
+				./io/Matlab/matlabio.h\
+				./io/Matlab/WriteMatlabData.cpp\
+				./io/Matlab/FetchMatlabData.cpp\
+				./io/Matlab/OptionParse.cpp
+#}}}
+#Serialsources  {{{1
+serial_sources= ./objects/Options/Option.cpp\
+			./objects/Options/Option.h\
+			./objects/Options/OptionDouble.cpp\
+			./objects/Options/OptionDouble.h\
+			./objects/Options/OptionLogical.cpp\
+			./objects/Options/OptionLogical.h\
+			./objects/Options/OptionChar.cpp\
+			./objects/Options/OptionChar.h\
+			./objects/Options/OptionStruct.cpp\
+			./objects/Options/OptionStruct.h\
+			./objects/Options/OptionCell.cpp\
+			./objects/Options/OptionCell.h\
+			./objects/Options/OptionUtilities.cpp\
+			./objects/Options/OptionUtilities.h\
+			./shared/Threads/issm_threads.h\
+			./shared/Threads/LaunchThread.cpp\
+			./shared/Threads/PartitionRange.cpp\
+			./shared/Numerics/isnan.h\
+			./shared/Numerics/isnan.cpp\
+			./shared/Exp/exp.h\
+			./shared/Exp/IsInPoly.cpp\
+			./shared/Exp/IsInPolySerial.cpp\
+			./shared/Exp/DomainOutlineRead.cpp\
+			./shared/Exp/DomainOutlineWrite.cpp\
+			./shared/TriMesh/trimesh.h\
+			./shared/TriMesh/AssociateSegmentToElement.cpp\
+			./shared/TriMesh/GridInsideHole.cpp\
+			./shared/TriMesh/OrderSegments.cpp\
+			./shared/TriMesh/SplitMeshForRifts.cpp\
+			./shared/TriMesh/TriMeshUtils.cpp\
+			./modules/AddExternalResultx/AddExternalResultx.h\
+			./modules/AddExternalResultx/AddExternalResultx.cpp\
+			./modules/Chacox/Chacox.h\
+			./modules/Chacox/Chacox.cpp\
+			./modules/Chacox/input_parse.cpp\
+			./modules/Chacox/chaco_seconds.cpp\
+			./modules/Chacox/user_params.cpp\
+			./modules/TriaSearchx/TriaSearchx.h\
+			./modules/TriaSearchx/TriaSearchx.cpp\
+			./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.h\
+			./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.cpp\
+			./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp\
+			./modules/Xy2llx/Xy2llx.h\
+			./modules/Xy2llx/Xy2llx.cpp\
+			./modules/Ll2xyx/Ll2xyx.h\
+			./modules/Ll2xyx/Ll2xyx.cpp\
+			./modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp\
+			./modules/InterpFromGridToMeshx/InterpFromGridToMeshx.h\
+			./modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp\
+			./modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp\
+			./modules/InterpFromMesh2dx/InterpFromMesh2dx.h\
+			./modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp\
+			./modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h\
+			./modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp\
+			./modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.h\
+			./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp\
+			./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.h\
+			./modules/HoleFillerx/HoleFillerx.cpp\
+			./modules/HoleFillerx/HoleFillerx.h\
+			./modules/AverageFilterx/AverageFilterx.cpp\
+			./modules/AverageFilterx/AverageFilterx.h\
+			./modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp\
+			./modules/MeshProfileIntersectionx/MeshProfileIntersectionx.h\
+			./modules/MeshProfileIntersectionx/MeshSegmentsIntersection.cpp\
+			./modules/MeshProfileIntersectionx/ElementSegmentsIntersection.cpp\
+			./modules/MeshProfileIntersectionx/ElementSegment.cpp\
+			./modules/MeshProfileIntersectionx/SegmentIntersect.cpp\
+			./modules/MeshProfileIntersectionx/NodeInElement.cpp\
+			./modules/ContourToMeshx/ContourToMeshx.cpp\
+			./modules/ContourToMeshx/ContourToMeshxt.cpp\
+			./modules/ContourToMeshx/ContourToMeshx.h\
+			./modules/ContourToNodesx/ContourToNodesx.cpp\
+			./modules/ContourToNodesx/ContourToNodesx.h\
+			./modules/Reducevectorgtosx/Reducevectorgtosx.cpp\
+			./modules/Reducevectorgtosx/Reducevectorgtosx.h\
+			./modules/NodeConnectivityx/NodeConnectivityx.cpp\
+			./modules/NodeConnectivityx/NodeConnectivityx.h\
+			./modules/ElementConnectivityx/ElementConnectivityx.cpp\
+			./modules/ElementConnectivityx/ElementConnectivityx.h\
+			./modules/Scotchx/Scotchx.cpp\
+			./modules/Scotchx/Scotchx.h\
+			./modules/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.cpp\
+			./modules/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.h
+#}}}
+
+#ISSM sources are a combination of core sources and sources related to specific capabilities (which can 
+#be activated by autotools conditionals {{{1
+
+#First the core
+issm_sources  =  $(core_sources)
+issm_psources  =  
+
+#Now the optional source
+if DAKOTA
+issm_sources +=  $(dakota_sources)
+endif
+
+if TRANSIENT
+issm_sources +=  $(transient_sources)
+issm_psources +=  $(transient_psources)
+endif
+
+if STEADYSTATE
+issm_sources +=  $(steadystate_sources)
+issm_psources +=  $(steadystate_psources)
+endif
+
+if PROGNOSTIC
+issm_sources +=  $(prognostic_sources)
+issm_psources +=  $(prognostic_psources)
+endif
+
+if THERMAL
+issm_sources +=  $(thermal_sources)
+issm_psources +=  $(thermal_psources)
+endif
+
+if CONTROL
+issm_sources +=  $(control_sources)
+issm_psources +=  $(control_psources)
+endif
+
+if HYDROLOGY
+issm_sources +=  $(hydrology_sources)
+issm_psources +=  $(hydrology_psources)
+endif
+
+if DIAGNOSTIC
+issm_sources +=  $(diagnostic_sources)
+issm_psources +=  $(diagnostic_psources)
+endif
+
+if BALANCED
+issm_sources +=  $(balanced_sources)
+issm_psources +=  $(balanced_psources)
+endif
+
+if RESPONSES
+issm_sources +=  $(responses_sources)
+endif
+
+if SLOPE
+issm_sources +=  $(slope_sources)
+issm_psources +=  $(slope_psources)
+endif
+
 if GROUNDINGLINE
-libpISSM_a_SOURCES += ./modules/GroundingLineMigrationx/GroundingLineMigrationx.cpp\
-					  ./modules/GroundingLineMigrationx/GroundingLineMigrationx.h\
-					  ./modules/GroundingLineMigrationx/GroundingLineMigrationxLocal.h\
-					  ./modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp\
-					  ./solutions/groundinglinemigration2d_core.cpp
-endif
-#}}}
-#Rifts sources  {{{1
+issm_sources +=  $(groundingline_sources)
+issm_psources +=  $(groundingline_psources)
+endif
+
 if RIFTS
-libpISSM_a_SOURCES += ./objects/Loads/Riftfront.cpp\
-					  ./objects/Loads/Riftfront.h\
-					  ./modules/ConstraintsStatex/RiftConstraintsState.cpp
-endif
-#}}}
-#3D sources  {{{1
+issm_sources +=  $(rifts_sources)
+endif
+
 if THREED
-libpISSM_a_SOURCES += ./objects/Gauss/GaussPenta.h\
-					  ./objects/Gauss/GaussPenta.cpp\
-					  ./objects/ElementResults/PentaVertexElementResult.h\
-					  ./objects/ElementResults/PentaVertexElementResult.cpp\
-					  ./objects/Inputs/PentaVertexInput.h\
-					  ./objects/Inputs/PentaVertexInput.cpp\
-					  ./objects/Elements/Penta.h\
-					  ./objects/Elements/Penta.cpp\
-					  ./objects/Elements/PentaHook.h\
-					  ./objects/Elements/PentaHook.cpp\
-					  ./objects/Elements/PentaRef.h\
-					  ./objects/Elements/PentaRef.cpp
-endif
+issm_sources +=  $(threed_sources)
+endif
+
+#}}}
+
+#ISSM serial library {{{1
+libISSM_a_SOURCES = $(issm_sources)
+libISSM_a_SOURCES += $(serial_sources)
+libISSM_a_SOURCES += $(bamg_sources)
+libISSM_a_SOURCES += $(kml_sources)
+libISSM_a_SOURCES += $(matlab_sources)
+
+libISSM_a_CXXFLAGS = -fPIC -DMATLAB -D_SERIAL_ -ansi -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXOPTFLAGS)
+if LARGEARRAYS
+libISSM_a_CXXFLAGS += -D__GCC4BUILD__  
+else
+libISSM_a_CXXFLAGS += -DMX_COMPAT_32 
+endif
+
+#}}}
+#ISSM parallel library {{{1
+libpISSM_a_SOURCES = $(issm_sources)
+libpISSM_a_SOURCES += $(issm_psources)
+libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(CXXOPTFLAGS) 
+#}}}
+#Overload library, to overload any non-standard symbols. {{{1
+libOverload_a_SOURCES = ./shared/String/stricmp.c
+libOverload_a_CFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(COPTFLAGS)
 #}}}
 
@@ -1326,3 +905,2 @@
 
 #}}}
-
