Index: issm/trunk/src/wrappers/matlab/Makefile.am
===================================================================
--- issm/trunk/src/wrappers/matlab/Makefile.am	(revision 21341)
+++ issm/trunk/src/wrappers/matlab/Makefile.am	(revision 21421)
@@ -115,5 +115,5 @@
 # Module sources and dependencies {{{
 if !WINDOWS
-libISSMMatlab_la_LIBADD = ./../../c/libISSMCore.la ./../../c/libISSMModules.la $(MPILIB) $(PETSCLIB) $(MKLLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) $(MEXLIB) 
+libISSMMatlab_la_LIBADD = ./../../c/libISSMCore.la ./../../c/libISSMModules.la $(PETSCLIB) $(MPILIB) $(MKLLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) $(MEXLIB) 
 endif
 
@@ -124,5 +124,5 @@
 
 if !WINDOWS
-libISSMApi_la_LIBADD = $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) $(MEXLIB)
+libISSMApi_la_LIBADD = $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) $(MEXLIB)
 endif
 
@@ -133,13 +133,13 @@
 BamgMesher_matlab_la_SOURCES = ../BamgMesher/BamgMesher.cpp
 BamgMesher_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-BamgMesher_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+BamgMesher_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 BamgConvertMesh_matlab_la_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp
 BamgConvertMesh_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-BamgConvertMesh_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+BamgConvertMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 BamgTriangulate_matlab_la_SOURCES = ../BamgTriangulate/BamgTriangulate.cpp
 BamgTriangulate_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-BamgTriangulate_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+BamgTriangulate_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 if CHACO
@@ -151,92 +151,92 @@
 ContourToMesh_matlab_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp
 ContourToMesh_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-ContourToMesh_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
+ContourToMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
 
 ExpToLevelSet_matlab_la_SOURCES = ../ExpToLevelSet/ExpToLevelSet.cpp
 ExpToLevelSet_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-ExpToLevelSet_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
+ExpToLevelSet_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
 
 ContourToNodes_matlab_la_SOURCES = ../ContourToNodes/ContourToNodes.cpp
 ContourToNodes_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-ContourToNodes_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+ContourToNodes_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 DistanceToMaskBoundary_matlab_la_SOURCES = ../DistanceToMaskBoundary/DistanceToMaskBoundary.cpp
 DistanceToMaskBoundary_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-DistanceToMaskBoundary_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+DistanceToMaskBoundary_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 ElementConnectivity_matlab_la_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp
 ElementConnectivity_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-ElementConnectivity_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+ElementConnectivity_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 InterpFromGridToMesh_matlab_la_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp
 InterpFromGridToMesh_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-InterpFromGridToMesh_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
+InterpFromGridToMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
 
 InterpFromMeshToMesh2d_matlab_la_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
 InterpFromMeshToMesh2d_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-InterpFromMeshToMesh2d_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
+InterpFromMeshToMesh2d_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
 
 InterpFromMeshToMesh3d_matlab_la_SOURCES = ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
 InterpFromMeshToMesh3d_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-InterpFromMeshToMesh3d_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+InterpFromMeshToMesh3d_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 InterpFromMeshToGrid_matlab_la_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp
 InterpFromMeshToGrid_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-InterpFromMeshToGrid_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+InterpFromMeshToGrid_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 InterpFromMesh2d_matlab_la_SOURCES = ../InterpFromMesh2d/InterpFromMesh2d.cpp
 InterpFromMesh2d_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-InterpFromMesh2d_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
+InterpFromMesh2d_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
 
 IssmConfig_matlab_la_SOURCES = ../IssmConfig/IssmConfig.cpp
 IssmConfig_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-IssmConfig_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
+IssmConfig_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB)
 
 ExpSimplify_matlab_la_SOURCES = ../ExpSimplify/ExpSimplify.cpp
 ExpSimplify_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-ExpSimplify_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+ExpSimplify_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 Kriging_matlab_la_SOURCES = ../Kriging/Kriging.cpp
 Kriging_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-Kriging_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
+Kriging_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
 
 MeshPartition_matlab_la_SOURCES = ../MeshPartition/MeshPartition.cpp
 MeshPartition_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-MeshPartition_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(METISLIB) $(GSLLIB) $(PROJ4LIB)
+MeshPartition_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(METISLIB) $(GSLLIB) $(PROJ4LIB)
 
 M1qn3_matlab_la_SOURCES = ../M1qn3/M1qn3.cpp
 M1qn3_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-M1qn3_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(METISLIB) $(M1QN3LIB) $(GSLLIB) $(PROJ4LIB)
+M1qn3_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(METISLIB) $(M1QN3LIB) $(GSLLIB) $(PROJ4LIB)
 
 MeshProfileIntersection_matlab_la_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp
 MeshProfileIntersection_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-MeshProfileIntersection_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+MeshProfileIntersection_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 NodeConnectivity_matlab_la_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp
 NodeConnectivity_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-NodeConnectivity_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+NodeConnectivity_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 PointCloudFindNeighbors_matlab_la_SOURCES = ../PointCloudFindNeighbors/PointCloudFindNeighbors.cpp
 PointCloudFindNeighbors_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-PointCloudFindNeighbors_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
+PointCloudFindNeighbors_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB) $(PROJ4LIB)
 
 PropagateFlagsFromConnectivity_matlab_la_SOURCES = ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp
 PropagateFlagsFromConnectivity_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-PropagateFlagsFromConnectivity_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+PropagateFlagsFromConnectivity_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 Scotch_matlab_la_SOURCES = ../Scotch/Scotch.cpp
 Scotch_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-Scotch_matlab_la_LIBADD = ${deps} $(SCOTCHLIB) $(MPILIB) $(PETSCLIB) $(BLASLAPACKLIB)
+Scotch_matlab_la_LIBADD = ${deps} $(SCOTCHLIB) $(PETSCLIB) $(MPILIB) $(BLASLAPACKLIB)
 
 ShpRead_matlab_la_SOURCES = ../ShpRead/ShpRead.cpp
 ShpRead_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-ShpRead_matlab_la_LIBADD = ${deps} $(SHAPELIBLIB) $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
+ShpRead_matlab_la_LIBADD = ${deps} $(SHAPELIBLIB) $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
 
 TriMesh_matlab_la_SOURCES = ../TriMesh/TriMesh.cpp
 TriMesh_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-TriMesh_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(TRIANGLELIB) $(GSLLIB) $(PROJ4LIB)
+TriMesh_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(TRIANGLELIB) $(GSLLIB) $(PROJ4LIB)
 
 TriMeshProcessRifts_matlab_la_SOURCES = ../TriMeshProcessRifts/TriMeshProcessRifts.cpp
 TriMeshProcessRifts_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}
-TriMeshProcessRifts_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)
-#}}}
+TriMeshProcessRifts_matlab_la_LIBADD = ${deps} $(PETSCLIB) $(MPILIB) $(GSLLIB) $(PROJ4LIB)
+#}}}
