diff --git a/src/kits/opengl/GLDispatcher.cpp b/src/kits/opengl/GLDispatcher.cpp index d9d819900c..2dfbfe0110 100644 --- a/src/kits/opengl/GLDispatcher.cpp +++ b/src/kits/opengl/GLDispatcher.cpp @@ -32,12 +32,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -#include -#include "glheader.h" - extern "C" { #include "glapi.h" +#include "glapi_priv.h" #include "glapitable.h" /* diff --git a/src/kits/opengl/GLDispatcher.h b/src/kits/opengl/GLDispatcher.h index 440c32115d..146921aa98 100644 --- a/src/kits/opengl/GLDispatcher.h +++ b/src/kits/opengl/GLDispatcher.h @@ -3,8 +3,11 @@ #include +#include #include +#include "glheader.h" + extern "C" { #include "glapi.h" } diff --git a/src/kits/opengl/GLView.cpp b/src/kits/opengl/GLView.cpp index 78dc4a619d..55881acf48 100644 --- a/src/kits/opengl/GLView.cpp +++ b/src/kits/opengl/GLView.cpp @@ -13,6 +13,7 @@ #include #include +#include #include #include diff --git a/src/kits/opengl/Jamfile b/src/kits/opengl/Jamfile index 2f32f033ab..1db3e8df4c 100644 --- a/src/kits/opengl/Jamfile +++ b/src/kits/opengl/Jamfile @@ -3,61 +3,42 @@ SubDir HAIKU_TOP src kits opengl ; SetSubDirSupportedPlatformsBeOSCompatible ; UsePrivateHeaders interface ; -UseLibraryHeaders mesa ; UsePrivateSystemHeaders ; +local sources = + GLView.cpp + GLDispatcher.cpp + GLRenderer.cpp + GLRendererRoster.cpp + ; + + if $(TARGET_PLATFORM) != haiku { UseHeaders [ FDirName $(HAIKU_TOP) headers os opengl ] : true ; # We need our public GL headers also when not compiling for Haiku. } -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa ] ; -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa main ] ; -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa glapi ] ; -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa math ] ; -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa tnl ] ; -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa shader ] ; -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa swrast ] ; -UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa swrast_setup ] ; +SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; +Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; -{ - local defines ; - defines = BEOS_THREADS GNU_ASSEMBLER ; +UseHeaders [ FDirName $(HAIKU_MESA_DIR) include ] ; +UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa ] ; +UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa main ] ; +UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi ] ; +UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi glapi ] ; - if $(TARGET_ARCH) = x86 { - defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM USE_SSE_ASM ; - } else if $(TARGET_ARCH) = ppc { - # Not yet supported, as current Mesa3D PPC assembly is Linux-dependent! - # defines += USE_PPC_ASM ; - } else if $(TARGET_ARCH) = sparc { - defines += USE_SPARC_ASM ; - } - defines = [ FDefines $(defines) ] ; - SubDirCcFlags $(defines) ; - SubDirC++Flags $(defines) ; - SubDirAsFlags $(defines) ; -} +LINKFLAGS on libGL.so = [ on libGL.so return $(LINKFLAGS) ] + -Xlinker --strip-debug -Xlinker --whole-archive -Xlinker -zmuldefs ; -SharedLibrary libGL.so : - GLView.cpp - GLDispatcher.cpp - GLRenderer.cpp - GLRendererRoster.cpp - : +SharedLibrary libGL.so : $(sources) : - # Mesa GL API dispatching code - glapi-dispatching.o + # Mesa libraries (from Mesa optional package): + $(HAIKU_MESA_LIBS) - # GLU API is included in libGL.so under BeOS R5, not a separate libglu.so library - sgi-glu.o - - # GLUT API is included in libGL.so under Haiku, not a separate libglut.so library - glut.o - - # External libs: - be - game # BWindowScreen needed by BGLScreen stub class + # External libraries: + be + game # BWindowScreen needed by BGLScreen stub class $(TARGET_LIBSTDC++) ;