diff --git a/3d-viewer/3d_canvas/eda_3d_canvas.cpp b/3d-viewer/3d_canvas/eda_3d_canvas.cpp
index 88db847653..afa51ad1b8 100644
--- a/3d-viewer/3d_canvas/eda_3d_canvas.cpp
+++ b/3d-viewer/3d_canvas/eda_3d_canvas.cpp
@@ -23,7 +23,7 @@
  */
 
 #include <gal/opengl/kiglew.h>    // Must be included first
-#include <gl_utils.h>
+#include <gal/opengl/gl_utils.h>
 #include <wx/tokenzr.h>
 
 #include "../common_ogl/ogl_utils.h"
@@ -35,7 +35,7 @@
 #include <advanced_config.h>
 #include <board.h>
 #include <reporter.h>
-#include <gl_context_mgr.h>
+#include <gal/opengl/gl_context_mgr.h>
 #include <core/profile.h>        // To use GetRunningMicroSecs or another profiling utility
 #include <bitmaps.h>
 #include <macros.h>
diff --git a/3d-viewer/3d_model_viewer/eda_3d_model_viewer.cpp b/3d-viewer/3d_model_viewer/eda_3d_model_viewer.cpp
index b807ca96ee..b6501abc1a 100644
--- a/3d-viewer/3d_model_viewer/eda_3d_model_viewer.cpp
+++ b/3d-viewer/3d_model_viewer/eda_3d_model_viewer.cpp
@@ -35,7 +35,7 @@
 #include "../3d_cache/3d_cache.h"
 #include <wx/dcclient.h>
 #include <base_units.h>
-#include <gl_context_mgr.h>
+#include <gal/opengl/gl_context_mgr.h>
 #include <settings/common_settings.h>
 #include <pgm_base.h>
 #include <gal/dpi_scaling.h>
diff --git a/common/gal/CMakeLists.txt b/common/gal/CMakeLists.txt
index 3836fdaf86..bb69157d8b 100644
--- a/common/gal/CMakeLists.txt
+++ b/common/gal/CMakeLists.txt
@@ -2,7 +2,6 @@
 set( GAL_SRCS
     # Common part
     ../callback_gal.cpp
-    ../gl_context_mgr.cpp
     painter.cpp
     cursors.cpp
     dpi_scaling.cpp
@@ -20,6 +19,7 @@ set( GAL_SRCS
     opengl/opengl_gal.cpp
     opengl/gl_resources.cpp
 
+    opengl/gl_context_mgr.cpp
     opengl/shader.cpp
     opengl/vertex_item.cpp
     opengl/vertex_container.cpp
diff --git a/common/gl_context_mgr.cpp b/common/gal/opengl/gl_context_mgr.cpp
similarity index 98%
rename from common/gl_context_mgr.cpp
rename to common/gal/opengl/gl_context_mgr.cpp
index 5b3be3f050..e11ab8dc14 100644
--- a/common/gl_context_mgr.cpp
+++ b/common/gal/opengl/gl_context_mgr.cpp
@@ -23,7 +23,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  */
 
-#include <gl_context_mgr.h>
+#include <gal/opengl/gl_context_mgr.h>
 #include <wx/debug.h>
 
 
diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp
index b7087e59b4..068e4379cb 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -36,7 +36,7 @@
 #include <gal/opengl/opengl_gal.h>
 #include <gal/opengl/utils.h>
 #include <gal/definitions.h>
-#include <gl_context_mgr.h>
+#include <gal/opengl/gl_context_mgr.h>
 #include <geometry/shape_poly_set.h>
 #include <math/vector2wx.h>
 #include <bitmap_base.h>
@@ -53,7 +53,7 @@
 #include <core/profile.h>
 #include <trace_helpers.h>
 
-#include <gl_utils.h>
+#include <gal/opengl/gl_utils.h>
 
 #include <functional>
 #include <limits>
diff --git a/include/gal/kigal.h b/include/gal/kigal.h
new file mode 100644
index 0000000000..f5a48fe2b4
--- /dev/null
+++ b/include/gal/kigal.h
@@ -0,0 +1,32 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <import_export.h>
+
+#ifndef SWIG
+	#if defined( KIGAL_DLL )
+		#define KIGAL_API APIEXPORT
+	#else
+		#define KIGAL_API APIIMPORT
+	#endif
+#else
+#define GAL_API
+#endif
\ No newline at end of file
diff --git a/include/gl_context_mgr.h b/include/gal/opengl/gl_context_mgr.h
similarity index 100%
rename from include/gl_context_mgr.h
rename to include/gal/opengl/gl_context_mgr.h
diff --git a/include/gl_utils.h b/include/gal/opengl/gl_utils.h
similarity index 100%
rename from include/gl_utils.h
rename to include/gal/opengl/gl_utils.h