Index: /issm/trunk-jpl/configs/config-macosx64-larour-bothapis.sh
===================================================================
--- /issm/trunk-jpl/configs/config-macosx64-larour-bothapis.sh	(revision 12031)
+++ /issm/trunk-jpl/configs/config-macosx64-larour-bothapis.sh	(revision 12031)
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+#petsc 3.2
+#mpich 1.4
+
+./configure \
+	--prefix=$ISSM_TIER \
+	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+	--with-matlab-dir=$MATLAB_DIR \
+	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
+	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy\
+	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
+	--with-chaco-dir=$ISSM_TIER/externalpackages/chaco/install \
+	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
+	--with-math-lib="/usr/lib/libm.dylib" \
+	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
+	--with-numthreads=8 \
+	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
+	--with-petsc-arch=$ISSM_ARCH \
+	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ 
+	#--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+	#--with-boost-dir=$ISSM_TIER/externalpackages/boost/install/ \
Index: /issm/trunk-jpl/configure.ac
===================================================================
--- /issm/trunk-jpl/configure.ac	(revision 12030)
+++ /issm/trunk-jpl/configure.ac	(revision 12031)
@@ -38,4 +38,6 @@
 			src/c/Makefile
 			src/mex/Makefile
+			src/mex/python/Makefile
+			src/mex/matlab/Makefile
 			src/m/Makefile
 			bin/Makefile])
Index: /issm/trunk-jpl/etc/environment.sh
===================================================================
--- /issm/trunk-jpl/etc/environment.sh	(revision 12030)
+++ /issm/trunk-jpl/etc/environment.sh	(revision 12031)
@@ -259,6 +259,6 @@
 #PYTHON
 export PATH="$PYTHON_DIR/bin:$PATH"
-export PYTHONPATH="$PYTHONPATH:$ISSM_TIER/src/mex"
-export LD_LIBRARY_PATH=$ISSM_TIER/src/mex:$LD_LIBRARY_PATH
+export PYTHONPATH="$PYTHONPATH:$ISSM_TIER/src/mex/python"
+export LD_LIBRARY_PATH=$ISSM_TIER/src/mex/python:$LD_LIBRARY_PATH
 
 #MODELE
Index: /issm/trunk-jpl/m4/issm_options.m4
===================================================================
--- /issm/trunk-jpl/m4/issm_options.m4	(revision 12030)
+++ /issm/trunk-jpl/m4/issm_options.m4	(revision 12031)
@@ -202,6 +202,6 @@
 		AC_SUBST([MATLABINCL])
 		AC_SUBST([MEX])
-		WRAPPEREXT=$MEXEXT
-		AC_SUBST([WRAPPEREXT])
+		MATLABWRAPPEREXT=$MEXEXT
+		AC_SUBST([MATLABWRAPPEREXT])
 		AC_SUBST([MEXLIB]) 
 		AC_SUBST([MEXLINK])
@@ -320,6 +320,6 @@
 		AC_SUBST([PYTHONINCL])
 		AC_SUBST([PYTHONLIB])
-		WRAPPEREXT=$PYTHONEXT
-		AC_SUBST([WRAPPEREXT])
+		PYTHONWRAPPEREXT=$PYTHONEXT
+		AC_SUBST([PYTHONWRAPPEREXT])
 		AC_SUBST([PYTHONLINK])
 	else
Index: /issm/trunk-jpl/src/c/issm-binding.h
===================================================================
--- /issm/trunk-jpl/src/c/issm-binding.h	(revision 12030)
+++ /issm/trunk-jpl/src/c/issm-binding.h	(revision 12031)
@@ -8,9 +8,9 @@
 #endif
 
-#ifdef  _HAVE_MATLAB_
+#ifdef  _HAVE_MATLAB_MODULES_
 #include "./matlab/matlab-binding.h"
 #endif
 
-#ifdef  _HAVE_PYTHON_
+#ifdef  _HAVE_PYTHON_MODULES_
 #include "./python/python-binding.h"
 #endif
Index: /issm/trunk-jpl/src/c/matlab/include/matlab_macros.h
===================================================================
--- /issm/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12030)
+++ /issm/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12031)
@@ -14,4 +14,5 @@
 /*}}}*/
 
+#ifdef _HAVE_MATLAB_
 /* MODULEBOOT/MODULEEND {{{1*/
 
@@ -34,14 +35,11 @@
 //}}}
 /* WRAPPER {{{1*/
-#ifdef _HAVE_MATLAB_
 #define WRAPPER(modulename,...) void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) 
-#endif
 
 /*}}}*/
 /* CHECKARGUMENTS {{{1*/
-#ifdef _HAVE_MATLAB_
 #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,functionpointer)
+/*}}}*/
 #endif
-/*}}}*/
 
 #endif
Index: /issm/trunk-jpl/src/c/matlab/matlab-binding.h
===================================================================
--- /issm/trunk-jpl/src/c/matlab/matlab-binding.h	(revision 12030)
+++ /issm/trunk-jpl/src/c/matlab/matlab-binding.h	(revision 12031)
@@ -4,3 +4,4 @@
 #include "./io/matlabio.h"
 #include "./include/matlab_macros.h"
+
 #endif
Index: /issm/trunk-jpl/src/c/python/include/python_macros.h
===================================================================
--- /issm/trunk-jpl/src/c/python/include/python_macros.h	(revision 12030)
+++ /issm/trunk-jpl/src/c/python/include/python_macros.h	(revision 12031)
@@ -15,4 +15,5 @@
 /*}}}*/
 
+#ifdef _HAVE_PYTHON_
 /* MODULEBOOT/MODULEEND {{{1*/
 
@@ -56,4 +57,5 @@
 #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumPythonArguments(args, NRHS,functionpointer)
 /*}}}*/
+#endif
 
 #endif
Index: /issm/trunk-jpl/src/mex/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/mex/Makefile.am	(revision 12030)
+++ /issm/trunk-jpl/src/mex/Makefile.am	(revision 12031)
@@ -1,183 +1,8 @@
-INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
-EXEEXT=$(WRAPPEREXT)
-#Bin programs {{{1
-if MODULES
+SUBDIRS = 
 if MATLAB
-bin_PROGRAMS =  AverageFilter\
-				BamgMesher\
-				BamgConvertMesh\
-				BamgTriangulate\
-				Chaco\
-				ContourToMesh \
-				ContourToNodes \
-				ElementConnectivity\
-				EnumToString\
-				Exp2Kml \
-				HoleFiller \
-				InternalFront\
-				InterpFromGridToMesh \
-				InterpFromMeshToMesh2d \
-				InterpFromMeshToMesh3d \
-				InterpFromMeshToGrid \
-				InterpFromMesh2d \
-				KMLFileRead \
-				KMLMeshWrite \
-				KMLOverlay \
-				Kml2Exp \
-				Ll2xy \
-				NodeConnectivity \
-				MeshPartition\
-				MeshProfileIntersection\
-				PointCloudFindNeighbors\
-				PropagateFlagsFromConnectivity\
-				Scotch\
-				Shp2Kml\
-				StringToEnum\
-				TriaSearch\
-				TriMesh\
-				TriMeshRifts\
-				TriMeshNoDensity\
-				TriMeshProcessRifts\
-				TriMeshRefine\
-				Xy2ll
-endif
-if PYTHON
-bin_PROGRAMS = TriMesh
-endif
-endif 
-#}}}
-#Flags and libraries {{{1
-LDADD = ../c/libISSMCore.a ../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
-
-#Triangle library
-AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
-
-if MATLAB
-AM_LDFLAGS   = $(MEXLINK)
-AM_CXXFLAGS +=  -D_HAVE_MATLAB_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
-LDADD       += $(MEXLIB) ../c/libISSMMatlab.a 
+SUBDIRS += matlab
 endif
 
 if PYTHON
-AM_LDFLAGS   = $(PYTHONLINK)
-AM_CXXFLAGS +=  -D_HAVE_PYTHON_ -DNPY_NO_DEPRECATED_API 
-LDADD       += $(BOOSTLIB) $(PYTHONLIB) ../c/libISSMPython.a
+SUBDIRS += python
 endif
-
-LDADD       += ../c/libISSMCore.a ../c/libISSMModules.a 
-
-#Optimization flags:
-AM_CXXFLAGS += $(CXXOPTFLAGS) 
-#}}}
-#Bin sources {{{1
-AverageFilter_SOURCES = AverageFilter/AverageFilter.cpp\
-			  AverageFilter/AverageFilter.h
-
-BamgMesher_SOURCES = BamgMesher/BamgMesher.cpp\
-					BamgMesher/BamgMesher.h
-
-BamgConvertMesh_SOURCES = BamgConvertMesh/BamgConvertMesh.cpp\
-					BamgConvertMesh/BamgConvertMesh.h
-
-BamgTriangulate_SOURCES = BamgTriangulate/BamgTriangulate.cpp\
-								  BamgTriangulate/BamgTriangulate.h
-
-Chaco_SOURCES = Chaco/Chaco.cpp\
-					Chaco/Chaco.h
-
-ContourToMesh_SOURCES = ContourToMesh/ContourToMesh.cpp\
-			  ContourToMesh/ContourToMesh.h
-
-ContourToNodes_SOURCES = ContourToNodes/ContourToNodes.cpp\
-			  ContourToNodes/ContourToNodes.h
-
-ElementConnectivity_SOURCES = ElementConnectivity/ElementConnectivity.cpp\
-			  ElementConnectivity/ElementConnectivity.h
-
-EnumToString_SOURCES = EnumToString/EnumToString.cpp\
-			  EnumToString/EnumToString.h
-
-StringToEnum_SOURCES = StringToEnum/StringToEnum.cpp\
-			  StringToEnum/StringToEnum.h
-
-HoleFiller_SOURCES = HoleFiller/HoleFiller.cpp\
-			  HoleFiller/HoleFiller.h
-
-InternalFront_SOURCES = InternalFront/InternalFront.cpp\
-										 InternalFront/InternalFront.h
-
-InterpFromGridToMesh_SOURCES = InterpFromGridToMesh/InterpFromGridToMesh.cpp\
-			  InterpFromGridToMesh/InterpFromGridToMesh.h
-
-InterpFromMeshToMesh2d_SOURCES = InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp\
-							InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
-
-InterpFromMeshToMesh3d_SOURCES = InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp\
-									InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h
-
-InterpFromMeshToGrid_SOURCES = InterpFromMeshToGrid/InterpFromMeshToGrid.cpp\
-									InterpFromMeshToGrid/InterpFromMeshToGrid.h
-
-InterpFromMesh2d_SOURCES = InterpFromMesh2d/InterpFromMesh2d.cpp\
-									InterpFromMesh2d/InterpFromMesh2d.h
-
-KMLFileRead_SOURCES = KMLFileRead/KMLFileRead.cpp\
-			  KMLFileRead/KMLFileRead.h
-
-KMLMeshWrite_SOURCES = KMLMeshWrite/KMLMeshWrite.cpp\
-			  KMLMeshWrite/KMLMeshWrite.h
-
-KMLOverlay_SOURCES = KMLOverlay/KMLOverlay.cpp\
-			  KMLOverlay/KMLOverlay.h
-
-Xy2ll_SOURCES = Xy2ll/Xy2ll.cpp\
-			  Xy2ll/Xy2ll.h
-
-Ll2xy_SOURCES = Ll2xy/Ll2xy.cpp\
-			  Ll2xy/Ll2xy.h
-
-Exp2Kml_SOURCES = Exp2Kml/Exp2Kml.cpp\
-			  Exp2Kml/Exp2Kml.h
-
-Kml2Exp_SOURCES = Kml2Exp/Kml2Exp.cpp\
-			  Kml2Exp/Kml2Exp.h
-
-MeshPartition_SOURCES = MeshPartition/MeshPartition.cpp\
-			  MeshPartition/MeshPartition.h
-
-MeshProfileIntersection_SOURCES = MeshProfileIntersection/MeshProfileIntersection.cpp\
-			  MeshProfileIntersection/MeshProfileIntersection.h
-
-NodeConnectivity_SOURCES = NodeConnectivity/NodeConnectivity.cpp\
-										NodeConnectivity/NodeConnectivity.h
-
-PointCloudFindNeighbors_SOURCES = PointCloudFindNeighbors/PointCloudFindNeighbors.cpp\
-			  PointCloudFindNeighbors/PointCloudFindNeighbors.h
-
-PropagateFlagsFromConnectivity_SOURCES = PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp\
-			  PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
-
-Scotch_SOURCES = Scotch/Scotch.cpp\
-			  Scotch/Scotch.h
-
-Shp2Kml_SOURCES = Shp2Kml/Shp2Kml.cpp\
-			  Shp2Kml/Shp2Kml.h
-
-TriaSearch_SOURCES = TriaSearch/TriaSearch.cpp\
-			  TriaSearch/TriaSearch.h
-
-TriMesh_SOURCES = TriMesh/TriMesh.cpp\
-			  TriMesh/TriMesh.h
-
-TriMeshRifts_SOURCES = TriMeshRifts/TriMeshRifts.cpp\
-			  TriMeshRifts/TriMeshRifts.h
-
-TriMeshNoDensity_SOURCES = TriMeshNoDensity/TriMeshNoDensity.cpp\
-			  TriMeshNoDensity/TriMeshNoDensity.h
-
-TriMeshProcessRifts_SOURCES = TriMeshProcessRifts/TriMeshProcessRifts.cpp\
-			  TriMeshProcessRifts/TriMeshProcessRifts.h
-
-TriMeshRefine_SOURCES = TriMeshRefine/TriMeshRefine.cpp\
-			  TriMeshRefine/TriMeshRefine.h
-#}}}
Index: /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h
===================================================================
--- /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 12030)
+++ /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 12031)
@@ -28,5 +28,5 @@
 #include "../../c/EnumDefinitions/EnumDefinitions.h"
 
-#ifdef _HAVE_MATLAB_
+#ifdef _HAVE_MATLAB_MODULES_
 /* serial input macros: */
 #define DOMAINOUTLINE  (mxArray *)prhs[0]
@@ -41,5 +41,5 @@
 #endif
 
-#ifdef _HAVE_PYTHON_
+#ifdef _HAVE_PYTHON_MODULES_
 /* serial input macros: */
 #define DOMAINOUTLINE PyTuple_GetItem(args,0)
Index: /issm/trunk-jpl/src/mex/matlab/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/mex/matlab/Makefile.am	(revision 12031)
+++ /issm/trunk-jpl/src/mex/matlab/Makefile.am	(revision 12031)
@@ -0,0 +1,171 @@
+INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
+EXEEXT=$(MATLABWRAPPEREXT)
+#Bin programs {{{1
+if MODULES
+bin_PROGRAMS =  AverageFilter\
+				BamgMesher\
+				BamgConvertMesh\
+				BamgTriangulate\
+				Chaco\
+				ContourToMesh \
+				ContourToNodes \
+				ElementConnectivity\
+				EnumToString\
+				Exp2Kml \
+				HoleFiller \
+				InternalFront\
+				InterpFromGridToMesh \
+				InterpFromMeshToMesh2d \
+				InterpFromMeshToMesh3d \
+				InterpFromMeshToGrid \
+				InterpFromMesh2d \
+				KMLFileRead \
+				KMLMeshWrite \
+				KMLOverlay \
+				Kml2Exp \
+				Ll2xy \
+				NodeConnectivity \
+				MeshPartition\
+				MeshProfileIntersection\
+				PointCloudFindNeighbors\
+				PropagateFlagsFromConnectivity\
+				Scotch\
+				Shp2Kml\
+				StringToEnum\
+				TriaSearch\
+				TriMesh\
+				TriMeshRifts\
+				TriMeshNoDensity\
+				TriMeshProcessRifts\
+				TriMeshRefine\
+				Xy2ll
+endif 
+#}}}
+#Flags and libraries {{{1
+LDADD = ../../c/libISSMCore.a ../../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
+
+#Triangle library
+AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
+
+#Matlab part
+AM_LDFLAGS   = $(MEXLINK)
+AM_CXXFLAGS +=  -D_HAVE_MATLAB_MODULES_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
+LDADD       += $(MEXLIB) ../../c/libISSMMatlab.a 
+
+LDADD       += ../../c/libISSMCore.a ../../c/libISSMModules.a 
+
+#Optimization flags:
+AM_CXXFLAGS += $(CXXOPTFLAGS) 
+#}}}
+#Bin sources {{{1
+AverageFilter_SOURCES = ../AverageFilter/AverageFilter.cpp\
+			  ../AverageFilter/AverageFilter.h
+
+BamgMesher_SOURCES = ../BamgMesher/BamgMesher.cpp\
+					../BamgMesher/BamgMesher.h
+
+BamgConvertMesh_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp\
+					../BamgConvertMesh/BamgConvertMesh.h
+
+BamgTriangulate_SOURCES = ../BamgTriangulate/BamgTriangulate.cpp\
+								  ../BamgTriangulate/BamgTriangulate.h
+
+Chaco_SOURCES = ../Chaco/Chaco.cpp\
+					../Chaco/Chaco.h
+
+ContourToMesh_SOURCES = ../ContourToMesh/ContourToMesh.cpp\
+			  ../ContourToMesh/ContourToMesh.h
+
+ContourToNodes_SOURCES = ../ContourToNodes/ContourToNodes.cpp\
+			  ../ContourToNodes/ContourToNodes.h
+
+ElementConnectivity_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp\
+			  ../ElementConnectivity/ElementConnectivity.h
+
+EnumToString_SOURCES = ../EnumToString/EnumToString.cpp\
+			  ../EnumToString/EnumToString.h
+
+StringToEnum_SOURCES = ../StringToEnum/StringToEnum.cpp\
+			  ../StringToEnum/StringToEnum.h
+
+HoleFiller_SOURCES = ../HoleFiller/HoleFiller.cpp\
+			  ../HoleFiller/HoleFiller.h
+
+InternalFront_SOURCES = ../InternalFront/InternalFront.cpp\
+										 ../InternalFront/InternalFront.h
+
+InterpFromGridToMesh_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp\
+			  ../InterpFromGridToMesh/InterpFromGridToMesh.h
+
+InterpFromMeshToMesh2d_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp\
+							../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
+
+InterpFromMeshToMesh3d_SOURCES = ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp\
+									../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h
+
+InterpFromMeshToGrid_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp\
+									../InterpFromMeshToGrid/InterpFromMeshToGrid.h
+
+InterpFromMesh2d_SOURCES = ../InterpFromMesh2d/InterpFromMesh2d.cpp\
+									../InterpFromMesh2d/InterpFromMesh2d.h
+
+KMLFileRead_SOURCES = ../KMLFileRead/KMLFileRead.cpp\
+			  ../KMLFileRead/KMLFileRead.h
+
+KMLMeshWrite_SOURCES = ../KMLMeshWrite/KMLMeshWrite.cpp\
+			  ../KMLMeshWrite/KMLMeshWrite.h
+
+KMLOverlay_SOURCES = ../KMLOverlay/KMLOverlay.cpp\
+			  ../KMLOverlay/KMLOverlay.h
+
+Xy2ll_SOURCES = ../Xy2ll/Xy2ll.cpp\
+			  ../Xy2ll/Xy2ll.h
+
+Ll2xy_SOURCES = ../Ll2xy/Ll2xy.cpp\
+			  ../Ll2xy/Ll2xy.h
+
+Exp2Kml_SOURCES = ../Exp2Kml/Exp2Kml.cpp\
+			  ../Exp2Kml/Exp2Kml.h
+
+Kml2Exp_SOURCES = ../Kml2Exp/Kml2Exp.cpp\
+			  ../Kml2Exp/Kml2Exp.h
+
+MeshPartition_SOURCES = ../MeshPartition/MeshPartition.cpp\
+			  ../MeshPartition/MeshPartition.h
+
+MeshProfileIntersection_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp\
+			  ../MeshProfileIntersection/MeshProfileIntersection.h
+
+NodeConnectivity_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\
+										../NodeConnectivity/NodeConnectivity.h
+
+PointCloudFindNeighbors_SOURCES = ../PointCloudFindNeighbors/PointCloudFindNeighbors.cpp\
+			  ../PointCloudFindNeighbors/PointCloudFindNeighbors.h
+
+PropagateFlagsFromConnectivity_SOURCES = ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp\
+			  ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
+
+Scotch_SOURCES = ../Scotch/Scotch.cpp\
+			  ../Scotch/Scotch.h
+
+Shp2Kml_SOURCES = ../Shp2Kml/Shp2Kml.cpp\
+			  ../Shp2Kml/Shp2Kml.h
+
+TriaSearch_SOURCES = ../TriaSearch/TriaSearch.cpp\
+			  ../TriaSearch/TriaSearch.h
+
+TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
+			  ../TriMesh/TriMesh.h
+
+TriMeshRifts_SOURCES = ../TriMeshRifts/TriMeshRifts.cpp\
+			  ../TriMeshRifts/TriMeshRifts.h
+
+TriMeshNoDensity_SOURCES = ../TriMeshNoDensity/TriMeshNoDensity.cpp\
+			  ../TriMeshNoDensity/TriMeshNoDensity.h
+
+TriMeshProcessRifts_SOURCES = ../TriMeshProcessRifts/TriMeshProcessRifts.cpp\
+			  ../TriMeshProcessRifts/TriMeshProcessRifts.h
+
+TriMeshRefine_SOURCES = ../TriMeshRefine/TriMeshRefine.cpp\
+			  ../TriMeshRefine/TriMeshRefine.h
+#}}}
Index: /issm/trunk-jpl/src/mex/python/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/mex/python/Makefile.am	(revision 12031)
+++ /issm/trunk-jpl/src/mex/python/Makefile.am	(revision 12031)
@@ -0,0 +1,27 @@
+INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
+EXEEXT=$(PYTHONWRAPPEREXT)
+#Bin programs {{{1
+if MODULES
+bin_PROGRAMS = TriMesh
+endif 
+#}}}
+#Flags and libraries {{{1
+LDADD = ../../c/libISSMCore.a ../../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
+
+#Triangle library
+AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
+
+#Python part
+AM_LDFLAGS   = $(PYTHONLINK)
+AM_CXXFLAGS +=  -D_HAVE_PYTHON_MODULES_ -DNPY_NO_DEPRECATED_API 
+LDADD       += $(BOOSTLIB) $(PYTHONLIB) ../../c/libISSMPython.a
+
+LDADD       += ../../c/libISSMCore.a ../../c/libISSMModules.a 
+
+#Optimization flags:
+AM_CXXFLAGS += $(CXXOPTFLAGS) 
+#}}}
+#Bin sources {{{1
+TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
+			  ../TriMesh/TriMesh.h
+#}}}
