Index: /issm/trunk/src/c/objects/BamgGeom.cpp
===================================================================
--- /issm/trunk/src/c/objects/BamgGeom.cpp	(revision 3273)
+++ /issm/trunk/src/c/objects/BamgGeom.cpp	(revision 3274)
@@ -1,2 +1,4 @@
+#ifdef _SERIAL_
+#include "mex.h"
 #include "stdio.h"
 #include "./BamgGeom.h"
@@ -124,2 +126,3 @@
 
 }
+#endif
Index: /issm/trunk/src/c/objects/BamgGeom.h
===================================================================
--- /issm/trunk/src/c/objects/BamgGeom.h	(revision 3273)
+++ /issm/trunk/src/c/objects/BamgGeom.h	(revision 3274)
@@ -4,6 +4,4 @@
 #ifndef BAMGGEOM_H_
 #define BAMGGEOM_H_
-
-#include <mex.h>
 
 struct BamgGeom{
@@ -39,5 +37,8 @@
 
 void BamgGeomInit(BamgGeom* bamggeom);
+
+#ifdef _SERIAL_
 void BamgGeomWrite(mxArray** bamggeom_mat,BamgGeom* bamggeom);
+#endif
 
 #endif
Index: /issm/trunk/src/c/objects/BamgMesh.cpp
===================================================================
--- /issm/trunk/src/c/objects/BamgMesh.cpp	(revision 3273)
+++ /issm/trunk/src/c/objects/BamgMesh.cpp	(revision 3274)
@@ -1,3 +1,5 @@
+#ifdef _SERIAL_
 #include "stdio.h"
+#include "mex.h"
 #include "./BamgMesh.h"
 
@@ -180,2 +182,3 @@
 	*pbamgmesh_mat=bamgmesh_mat;
 }
+#endif
Index: /issm/trunk/src/c/objects/BamgMesh.h
===================================================================
--- /issm/trunk/src/c/objects/BamgMesh.h	(revision 3273)
+++ /issm/trunk/src/c/objects/BamgMesh.h	(revision 3274)
@@ -4,6 +4,4 @@
 #ifndef BAMGMESH_H_
 #define BAMGMESH_H_
-
-#include <mex.h>
 
 struct BamgMesh{
@@ -47,5 +45,8 @@
 
 void BamgMeshInit(BamgMesh* bamgmesh);
+
+#ifdef _SERIAL_
 void BamgMeshWrite(mxArray** bamgmesh_mat,BamgMesh* bamgmesh);
+#endif
 
 #endif
