diff --git a/contrib/mobile/drawContext.cpp b/contrib/mobile/drawContext.cpp
index 403ca1abdb89ddbd8aa0bd45fa913f914ecfa48d..549501b404e5639ab116d6ae02bbf4def865b0ab 100644
--- a/contrib/mobile/drawContext.cpp
+++ b/contrib/mobile/drawContext.cpp
@@ -1,33 +1,5 @@
-#if !defined(BUILD_ANDROID)
-#define BUILD_IOS 1
-#endif
-
 #include <map>
 
-#if defined(BUILD_IOS)
-#include <OpenGLES/ES1/gl.h>
-#include <OpenGLES/ES1/glext.h>
-
-#include <Gmsh/Gmsh.h>
-#include <Gmsh/OpenFile.h>
-#include <Gmsh/GModel.h>
-#include <Gmsh/MElement.h>
-#include <Gmsh/VertexArray.h>
-#include <Gmsh/onelab.h>
-#include <Gmsh/onelabUtils.h>
-#include <Gmsh/PView.h>
-#include <Gmsh/PViewOptions.h>
-#include <Gmsh/PViewData.h>
-#include <Gmsh/Context.h>
-#include <Gmsh/StringUtils.h>
-
-#include <GetDP/GetDP.h>
-#endif
-
-#if defined(BUILD_ANDROID)
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
 #include <gmsh/Gmsh.h>
 #include <gmsh/OpenFile.h>
 #include <gmsh/GModel.h>
@@ -40,10 +12,15 @@
 #include <gmsh/PViewData.h>
 #include <gmsh/Context.h>
 #include <gmsh/StringUtils.h>
-
 #include <getdp/GetDP.h>
 
+#if defined(BUILD_ANDROID)
+#include <GLES/gl.h>
+#include <GLES/glext.h>
 #include "androidGModel.h"
+#else // iOS
+#include <OpenGLES/ES1/gl.h>
+#include <OpenGLES/ES1/glext.h>
 #endif
 
 #include "drawContext.h"
diff --git a/contrib/mobile/drawContext.h b/contrib/mobile/drawContext.h
index f71c9e51af41db6bce14cdd6bb22e1417be8e8ae..f68d3b3e82b7203608f7d708c8535dd31cd9f31c 100644
--- a/contrib/mobile/drawContext.h
+++ b/contrib/mobile/drawContext.h
@@ -1,21 +1,10 @@
 #ifndef _DRAW_GMODEL_H_
 #define _DRAW_GMODEL_H_
 
-#ifndef __cplusplus
-#error You need a Cpp compiler!
-#endif
-
-#if !defined(BUILD_ANDROID)
-#define BUILD_IOS 1
-#endif
-
 #include <string>
 
-#if defined(BUILD_IOS)
-#include <Gmsh/PView.h>
-#include <Gmsh/PViewOptions.h>
-#include <Gmsh/Context.h>
-#endif
+#include <gmsh/PView.h>
+#include <gmsh/PViewOptions.h>
 
 #include "movePosition.h"
 
diff --git a/contrib/mobile/drawGeom.cpp b/contrib/mobile/drawGeom.cpp
index e11e9f03ce5418b952b92819117a732e24c146b7..71e377ff281d0eaab0980961fcdfd0a8729e7e79 100644
--- a/contrib/mobile/drawGeom.cpp
+++ b/contrib/mobile/drawGeom.cpp
@@ -1,25 +1,16 @@
 #include <stdlib.h>
-#if !defined(BUILD_ANDROID)
-#define BUILD_IOS 1
-#endif
-
-#if defined(BUILD_IOS)
-#include <OpenGLES/ES1/gl.h>
-#include <OpenGLES/ES1/glext.h>
-
-#include <Gmsh/Gmsh.h>
-#include <Gmsh/GModel.h>
-#endif
 
 #if defined(BUILD_ANDROID)
 #include <GLES/gl.h>
 #include <GLES/glext.h>
+#else
+#include <OpenGLES/ES1/gl.h>
+#include <OpenGLES/ES1/glext.h>
+#endif
 
 #include <gmsh/Gmsh.h>
 #include <gmsh/GModel.h>
-#include <gmsh/PView.h>
 #include <gmsh/Context.h>
-#endif
 
 #include "drawContext.h"
 
diff --git a/contrib/mobile/drawMesh.cpp b/contrib/mobile/drawMesh.cpp
index 3694af0962830036bc7838ed4e52a28cd128aada..7d4be6a080909ef35a4c154df2cce44e0d921362 100644
--- a/contrib/mobile/drawMesh.cpp
+++ b/contrib/mobile/drawMesh.cpp
@@ -1,22 +1,10 @@
-#if !defined(BUILD_ANDROID)
-#define BUILD_IOS 1
-#endif
-
-#if defined(BUILD_IOS)
-#include <OpenGLES/ES1/gl.h>
-#include <OpenGLES/ES1/glext.h>
-
-#include <Gmsh/Gmsh.h>
-#include <Gmsh/GModel.h>
-#include <Gmsh/GEdgeCompound.h>
-#include <Gmsh/GFaceCompound.h>
-#include <Gmsh/PView.h>
-#include <Gmsh/PViewData.h>
-#endif
-
 #if defined(BUILD_ANDROID)
 #include <GLES/gl.h>
 #include <GLES/glext.h>
+#else
+#include <OpenGLES/ES1/gl.h>
+#include <OpenGLES/ES1/glext.h>
+#endif
 
 #include <gmsh/Gmsh.h>
 #include <gmsh/GModel.h>
@@ -25,7 +13,6 @@
 #include <gmsh/PView.h>
 #include <gmsh/PViewData.h>
 #include <gmsh/Context.h>
-#endif
 
 #include "drawContext.h"
 
diff --git a/contrib/mobile/drawString.cpp b/contrib/mobile/drawString.cpp
index d9b6baad9b166eea78c9ef2a8843ab76418e5a14..0efdd6342240499fe10b782e4298977b906b8ebe 100644
--- a/contrib/mobile/drawString.cpp
+++ b/contrib/mobile/drawString.cpp
@@ -1,15 +1,9 @@
-#if !defined(BUILD_ANDROID)
-#define BUILD_IOS 1
-#endif
-
-#if defined(BUILD_IOS)
-#include <OpenGLES/ES1/gl.h>
-#include <OpenGLES/ES1/glext.h>
-#endif
-
 #if defined(BUILD_ANDROID)
 #include <GLES/gl.h>
 #include <GLES/glext.h>
+#else
+#include <OpenGLES/ES1/gl.h>
+#include <OpenGLES/ES1/glext.h>
 #endif
 
 #include "drawString.h"
diff --git a/contrib/mobile/drawString.h b/contrib/mobile/drawString.h
index 715cd5a0ac696f472948de423ffad0ce1f5b8105..4a6184bbfab6ad1e21ef36a69de8841ef7a69ba3 100644
--- a/contrib/mobile/drawString.h
+++ b/contrib/mobile/drawString.h
@@ -1,15 +1,9 @@
 #include <string>
 
-#if !defined(BUILD_ANDROID)
-#define BUILD_IOS 1
-#endif
-
-#if defined(BUILD_IOS)
-#include "iosGModel.h"
-#endif
-
 #if defined(BUILD_ANDROID)
 #include "androidGModel.h"
+#else
+#include "iosGModel.h"
 #endif
 
 class drawString