Index: /issm/trunk-jpl/src/ad/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/ad/Makefile.am	(revision 11657)
+++ /issm/trunk-jpl/src/ad/Makefile.am	(revision 11658)
@@ -1,28 +1,25 @@
-INCLUDES = @DAKOTAINCL@ @PETSCINCL@ @SLEPCINCL@ @MPIINCL@ @MATLABINCL@  @METISINCL@  @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@  @BLASLAPACKINCL@ @MKLINCL@ @MUMPSINCL@  @TRIANGLEINCL@ @HYPREINCL@ @MLINCL@ @TAOINCL@  @ADIC2INCL@
-
-#This Makefile.am is for automatic differentiation of the parallel version of ISSM.
-#We do not compile in serial mode
-#If user requests no parallel compilation, we compile an empty ISSM.
-#Compilation can still be blocked if user has not activated --with-adic compilation
+INCLUDES = @DAKOTAINCL@ @SHAPELIBINCL@ @PETSCINCL@ @SLEPCINCL@ @MPIINCL@ @MATLABINCL@  @METISINCL@  @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@  @BLASLAPACKINCL@ @MKLINCL@ @MUMPSINCL@  @TRIANGLEINCL@ @HYPREINCL@ @MLINCL@ @TAOINCL@
+EXEEXT=$(ISSMEXT)
 
 #Library declaration {{{1
-
+#Compile serial library, and then try and compile parallel library
+if NOSERIAL
 if NOPARALLEL
 lib_LIBRARIES = 
 else
-lib_LIBRARIES = libpISSM.a   libOverload.a
-endif
-
-if ADIC2
-lib_LIBRARIES += libAD.a libpISSMRose.a
-endif
-
-#}}}
-#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)
-#}}}
-#ISSM library  {{{1
-libpISSM_a_SOURCES = ./include/macros.h\
+lib_LIBRARIES = libpISSM.a libOverload.a
+endif
+else
+if NOPARALLEL
+lib_LIBRARIES = libISSM.a  libOverload.a
+else
+lib_LIBRARIES = libISSM.a libpISSM.a libOverload.a
+endif
+endif
+#}}}
+
+#sources
+#Core sources{{{1
+core_sources   = ./include/macros.h\
 					./include/typedefs.h\
 					./include/types.h\
@@ -38,4 +35,8 @@
 					./objects/Material.h\
 					./objects/Load.h\
+					./objects/Contour.h\
+					./objects/Contour.cpp\
+					./objects/OptArgs.h\
+					./objects/OptPars.h\
 					./objects/Loads/Friction.h\
 					./objects/Loads/Friction.cpp\
@@ -61,6 +62,6 @@
 					./objects/ElementResults/DoubleElementResult.h\
 					./objects/ElementResults/DoubleElementResult.cpp\
-					./objects/ElementResults/TriaVertexElementResult.h\
-					./objects/ElementResults/TriaVertexElementResult.cpp\
+					./objects/ElementResults/TriaP1ElementResult.h\
+					./objects/ElementResults/TriaP1ElementResult.cpp\
 					./objects/ElementResults/BoolElementResult.h\
 					./objects/ElementResults/BoolElementResult.cpp\
@@ -88,6 +89,6 @@
 					./objects/Inputs/Input.h\
 					./objects/Inputs/InputLocal.h\
-					./objects/Inputs/TriaVertexInput.h\
-					./objects/Inputs/TriaVertexInput.cpp\
+					./objects/Inputs/TriaP1Input.h\
+					./objects/Inputs/TriaP1Input.cpp\
 					./objects/Inputs/BoolInput.h\
 					./objects/Inputs/BoolInput.cpp\
@@ -138,4 +139,6 @@
 					./objects/Params/DoubleMatParam.cpp\
 					./objects/Params/DoubleMatParam.h\
+					./objects/Params/DoubleTransientMatParam.cpp\
+					./objects/Params/DoubleTransientMatParam.h\
 					./objects/Params/DoubleMatArrayParam.cpp\
 					./objects/Params/DoubleMatArrayParam.h\
@@ -161,4 +164,6 @@
 					./Container/Nodes.h\
 					./Container/Nodes.cpp\
+					./Container/Options.h\
+					./Container/Options.cpp\
 					./Container/Parameters.h\
 					./Container/Parameters.cpp\
@@ -181,5 +186,8 @@
 					./shared/Numerics/GaussPoints.cpp\
 					./shared/Numerics/cross.cpp\
+					./shared/Numerics/isnan.h\
+					./shared/Numerics/isnan.cpp\
 					./shared/Numerics/extrema.cpp\
+					./shared/Numerics/XZvectorsToCoordinateSystem.cpp\
 					./shared/Numerics/UnitConversion.cpp\
 					./shared/Numerics/PetscOptionsFromAnalysis.cpp\
@@ -244,5 +252,4 @@
 					./io/PrintfFunction.cpp\
 					./EnumDefinitions/EnumDefinitions.h\
-					./EnumDefinitions/EnumToModelField.cpp\
 					./modules/ModelProcessorx/ModelProcessorx.h\
 					./modules/ModelProcessorx/ModelProcessorx.cpp\
@@ -261,4 +268,6 @@
 					./modules/NodesDofx/NodesDofx.h\
 					./modules/NodesDofx/NodesDofx.cpp\
+					./modules/NodalValuex/NodalValuex.h\
+					./modules/NodalValuex/NodalValuex.cpp\
 					./modules/VerticesDofx/VerticesDofx.h\
 					./modules/VerticesDofx/VerticesDofx.cpp\
@@ -269,4 +278,6 @@
 					./modules/InputScalex/InputScalex.h\
 					./modules/InputScalex/InputScalex.cpp\
+					./modules/SurfaceAreax/SurfaceAreax.h\
+					./modules/SurfaceAreax/SurfaceAreax.cpp\
 					./modules/CreateNodalConstraintsx/CreateNodalConstraintsx.h\
 					./modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp\
@@ -299,4 +310,6 @@
 					./modules/SpcNodesx/SpcNodesx.h\
 					./modules/SpcNodesx/SpcNodesx.cpp\
+					./modules/PositiveDegreeDayx/PositiveDegreeDayx.h\
+					./modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp\
 					./modules/UpdateConstraintsx/UpdateConstraintsx.h\
 					./modules/UpdateConstraintsx/UpdateConstraintsx.cpp\
@@ -313,11 +326,17 @@
 					./modules/SystemMatricesx/SystemMatricesx.cpp\
 					./modules/SystemMatricesx/SystemMatricesx.h\
+					./modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp\
+					./modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h\
 					./modules/ConstraintsStatex/ConstraintsStatex.cpp\
 					./modules/ConstraintsStatex/ConstraintsStatex.h\
 					./modules/ConstraintsStatex/ConstraintsStateLocal.h\
+					./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/ResetCoordinateSystemx/ResetCoordinateSystemx.h\
+					./modules/ResetCoordinateSystemx/ResetCoordinateSystemx.cpp\
 					./modules/Solverx/Solverx.cpp\
 					./modules/Solverx/Solverx.h\
@@ -332,4 +351,5 @@
 					./modules/InputConvergencex/InputConvergencex.h\
 					./solutions/convergence.cpp\
+					./solutions/ProcessArguments.cpp\
 					./solutions/WriteLockFile.cpp\
 					./solutions/ResetBoundaryConditions.cpp\
@@ -337,12 +357,9 @@
 					./solutions/CorePointerFromSolutionEnum.cpp\
 					./solvers/solver_linear.cpp\
-					./solvers/solver_nonlinear.cpp
-
-
-libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(CXXOPTFLAGS) 
+					./solvers/solver_nonlinear.cpp\
+					./solvers/solver_newton.cpp
 #}}}
 #DAKOTA sources  {{{1
-if DAKOTA
-libpISSM_a_SOURCES +=  ./objects/DakotaPlugin.h\
+dakota_sources = ./objects/DakotaPlugin.h\
 					  ./objects/DakotaPlugin.cpp\
 					  ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h\
@@ -352,4 +369,6 @@
 					  ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h\
 					  ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp\
+					  ./modules/InputUpdateFromMatrixDakotax/InputUpdateFromMatrixDakotax.h\
+					  ./modules/InputUpdateFromMatrixDakotax/InputUpdateFromMatrixDakotax.cpp\
 					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
 					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
@@ -359,40 +378,27 @@
 					  ./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/ModelProcessorx/Dakota/CreateParametersDakota.cpp\
 					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h
-endif
+dakota_psources= ./modules/Dakotax/SpawnCoreParallel.cpp
 #}}}
 #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\
-					  ./solutions/steadystateconvergence.cpp
-endif
+steadystate_psources = ./solutions/steadystate_core.cpp\
+					        ./solutions/steadystateconvergence.cpp
 #}}}
 #Prognostic sources  {{{1
-if PROGNOSTIC
-libpISSM_a_SOURCES +=  ./solutions/prognostic_core.cpp\
-					   ./modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp\
-					   ./modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\
-					   ./modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp\
-					   ./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
-
-endif
+prognostic_sources = ./modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp\
+					      ./modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\
+					      ./modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp\
+					      ./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
+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\
@@ -409,19 +415,13 @@
 					   ./modules/ConstraintsStatex/ThermalIsPresent.cpp\
 					   ./modules/ResetConstraintsx/ThermalConstraintsReset.cpp
-endif
+
+thermal_psources = ./solutions/thermal_core.cpp\
+					    ./solutions/thermal_core_step.cpp\
+					    ./solutions/enthalpy_core.cpp\
+					    ./solutions/enthalpy_core_step.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\
@@ -429,4 +429,8 @@
 					  ./modules/ControlInputScaleGradientx/ControlInputScaleGradientx.cpp\
 					  ./modules/ControlInputScaleGradientx/ControlInputScaleGradientx.h\
+					  ./modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp\
+					  ./modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.h\
+					  ./modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp\
+					  ./modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.h\
 					  ./modules/ModelProcessorx/Control/CreateParametersControl.cpp\
 					  ./modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp\
@@ -461,86 +465,87 @@
 					  ./shared/Numerics/BrentSearch.cpp\
 					  ./shared/Numerics/OptimalSearch.cpp\
-					  ./shared/Numerics/OptFunc.cpp\
-					  ./objects/OptArgs.h\
-					  ./objects/OptPars.h
-
-endif
+					  ./shared/Numerics/OptFunc.cpp
+
+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\
-					  ./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
+hydrology_sources  = ./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\
+					      ./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\
+					      ./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\
+					      ./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\
-					  ./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\
-					  ./solutions/diagnostic_core.cpp\
-					  ./solvers/solver_stokescoupling_nonlinear.cpp
-endif
+diagnostic_sources = ./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 \
+							./shared/Elements/CoordinateSystemTransform.cpp\
+							./shared/Elements/TransformLoadVectorCoord.cpp \
+							./shared/Elements/TransformStiffnessMatrixCoord.cpp \
+							./shared/Elements/TransformInvStiffnessMatrixCoord.cpp \
+							./shared/Elements/TransformSolutionCoord.cpp
+diagnostic_psources =./solutions/diagnostic_core.cpp\
+					      ./solvers/solver_stokescoupling_nonlinear.cpp
 #}}}
 #Balanced sources  {{{1
-if BALANCED
-libpISSM_a_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
+balanced_sources = ./modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp\
+					    ./modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp\
+					    ./modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp\
+					    ./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp
+balanced_psources = ./solutions/balancethickness_core.cpp
 #}}}
 #Responses sources  {{{1
-if RESPONSES
-libpISSM_a_SOURCES += ./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/RheologyBbarx/RheologyBbarx.cpp\
-					  ./modules/RheologyBbarx/RheologyBbarx.h\
-					  ./modules/MassFluxx/MassFluxx.cpp\
-					  ./modules/MassFluxx/MassFluxx.h\
-					  ./modules/NodalValuex/NodalValuex.h\
-					  ./modules/NodalValuex/NodalValuex.cpp\
-					  ./modules/SurfaceAreax/SurfaceAreax.h\
-					  ./modules/SurfaceAreax/SurfaceAreax.cpp\
-					  ./modules/Responsex/Responsex.h\
-					  ./modules/Responsex/Responsex.cpp
-endif
+responses_sources = ./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/IceVolumex/IceVolumex.h\
+					     ./modules/IceVolumex/IceVolumex.cpp\
+					     ./modules/ElementResponsex/ElementResponsex.h\
+					     ./modules/ElementResponsex/ElementResponsex.cpp\
+					     ./modules/MassFluxx/MassFluxx.cpp\
+					     ./modules/MassFluxx/MassFluxx.h
 #}}}
 #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\
@@ -549,82 +554,412 @@
 					  ./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  {{{1
+groundingline_sources= ./modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp\
+					        ./modules/GroundinglineMigrationx/GroundinglineMigrationx.h
+#}}}
+#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/PentaP1ElementResult.h\
+				     ./objects/ElementResults/PentaP1ElementResult.cpp\
+				     ./objects/Inputs/PentaP1Input.h\
+				     ./objects/Inputs/PentaP1Input.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\
+			     ./modules/KMLFileReadx/KMLFileReadx.h\
+			     ./modules/KMLFileReadx/KMLFileReadx.cpp\
+			     ./modules/KMLMeshWritex/KMLMeshWritex.h\
+			     ./modules/KMLMeshWritex/KMLMeshWritex.cpp\
+			     ./modules/KMLOverlayx/KMLOverlayx.h\
+			     ./modules/KMLOverlayx/KMLOverlayx.cpp\
+			     ./objects/KML/KML_Attribute.cpp\
+			     ./objects/KML/KML_Attribute.h\
+			     ./objects/KML/KML_Comment.cpp\
+			     ./objects/KML/KML_Comment.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/KML_Unknown.cpp\
+			     ./objects/KML/KML_Unknown.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/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/Dakotax/SpawnCoreSerial.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)
+issm_psources +=  $(dakota_psources)
+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)
+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
-#}}}
-
-#ADIC2 library, for automatic differentiation {{{1
-if ADIC2
+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_ -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXFLAGS) $(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_ $(CXXFLAGS) $(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) $(CFLAGS)
+#}}}
+
+#Executable {{{1
+if NOPARALLEL
+bin_PROGRAMS = 
+else 
+bin_PROGRAMS = issm
+endif
+
+#Standard libraries
+LDADD =      ./libpISSM.a ./libOverload.a
+
+#External packages
+LDADD += $(PETSCLIB) $(TAOLIB) $(FLIBS) $(PLAPACKLIB)  $(MUMPSLIB) $(SCALAPACKLIB)  $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB)  $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS)
+
+issm_SOURCES = solutions/issm.cpp
+issm_CXXFLAGS= -fPIC -D_PARALLEL_  $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 
+#}}}
+
+#Automatic differentiation: append this fold to the end of the src/c/Makefile.am to get this Makefile.am {{{
+if ADIC2 
+lib_LIBRARIES += libAD.a libpISSMRose.a
+
+#ADIC2 library, for automatic differentiation 
 #libAD_a_SOURCES = ./mini1.ad.c
 libAD_a_SOURCES = 
 libAD_a_CFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(COPTFLAGS)
 
+
+
 #test rose preprocessing 
 %.r2cpp.cpp : %.cpp
 	testTranslator -rose:o $@ -rose:skipfinalCompileStep -DHAVE_CONFIG_H -D_PARALLEL_ -D_C_ -I. -I../.. $(INCLUDES) $<
-
 libpISSMRose_a_SOURCES = $(libpISSM_a_SOURCES:.cpp=.r2cpp.cpp)
 libpISSMRose_a_CXXFLAGS= -fPIC -D_PARALLEL_ -D_C_ $(CXXOPTFLAGS)
+
+
+
 #Automatic differentiation rules: 
 %.ad.c: %.c
 	adic2 -mforward  $< --nary
-endif
-#}}}
-#Executable {{{1
-
-if NOPARALLEL
-bin_PROGRAMS = 
-else 
-bin_PROGRAMS = issm.exe issmRose.exe
-endif
-
-#Standard libraries
-LDADD =      ./libOverload.a
-issm_exe_LDADD = ./libpISSM.a $(LDADD)
-if ADIC2
+
+
+
+#Executable
+bin_PROGRAMS +=  issmRose.exe
 issmRose_exe_LDADD = ./libpISSMRose.a $(LDADD)
-endif
-
-#External packages
-LDADD += $(PETSCLIB) $(TAOLIB) $(FLIBS) $(PLAPACKLIB)  $(MUMPSLIB) $(SCALAPACKLIB)  $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB)  $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(ADIC2LIB) 
-
-
-issm_exe_SOURCES = solutions/issm.cpp
-issm_exe_CXXFLAGS= -fPIC -D_PARALLEL_  $(CXXOPTFLAGS) $(COPTFLAGS) 
 issmRose_exe_SOURCES = solutions/issm.cpp
 issmRose_exe_CXXFLAGS= -fPIC -D_PARALLEL_  $(CXXOPTFLAGS) $(COPTFLAGS) 
-
-#}}}
+LDADD +=  $(ADIC2LIB) 
+
+endif #}}}
