Use Mesa optional package to build opengl kit
This commit is contained in:
parent
016d04966a
commit
f6a611ebf0
@ -32,12 +32,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include "glheader.h"
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
#include "glapi.h"
|
#include "glapi.h"
|
||||||
|
#include "glapi_priv.h"
|
||||||
#include "glapitable.h"
|
#include "glapitable.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3,8 +3,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <BeBuild.h>
|
#include <BeBuild.h>
|
||||||
|
#include <GL/gl.h>
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
|
#include "glheader.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "glapi.h"
|
#include "glapi.h"
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <DirectWindow.h>
|
#include <DirectWindow.h>
|
||||||
|
@ -3,61 +3,42 @@ SubDir HAIKU_TOP src kits opengl ;
|
|||||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
UsePrivateHeaders interface ;
|
UsePrivateHeaders interface ;
|
||||||
UseLibraryHeaders mesa ;
|
|
||||||
UsePrivateSystemHeaders ;
|
UsePrivateSystemHeaders ;
|
||||||
|
|
||||||
|
local sources =
|
||||||
|
GLView.cpp
|
||||||
|
GLDispatcher.cpp
|
||||||
|
GLRenderer.cpp
|
||||||
|
GLRendererRoster.cpp
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
if $(TARGET_PLATFORM) != haiku {
|
if $(TARGET_PLATFORM) != haiku {
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers os opengl ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers os opengl ] : true ;
|
||||||
# We need our public GL headers also when not compiling for Haiku.
|
# We need our public GL headers also when not compiling for Haiku.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa ] ;
|
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ;
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs mesa mesa main ] ;
|
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ;
|
||||||
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 ] ;
|
|
||||||
|
|
||||||
{
|
UseHeaders [ FDirName $(HAIKU_MESA_DIR) include ] ;
|
||||||
local defines ;
|
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa ] ;
|
||||||
defines = BEOS_THREADS GNU_ASSEMBLER ;
|
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) ] ;
|
LINKFLAGS on libGL.so = [ on libGL.so return $(LINKFLAGS) ]
|
||||||
SubDirCcFlags $(defines) ;
|
-Xlinker --strip-debug -Xlinker --whole-archive -Xlinker -zmuldefs ;
|
||||||
SubDirC++Flags $(defines) ;
|
|
||||||
SubDirAsFlags $(defines) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
SharedLibrary libGL.so :
|
SharedLibrary libGL.so : $(sources) :
|
||||||
GLView.cpp
|
|
||||||
GLDispatcher.cpp
|
|
||||||
GLRenderer.cpp
|
|
||||||
GLRendererRoster.cpp
|
|
||||||
:
|
|
||||||
|
|
||||||
# Mesa GL API dispatching code
|
# Mesa libraries (from Mesa optional package):
|
||||||
<mesa>glapi-dispatching.o
|
$(HAIKU_MESA_LIBS)
|
||||||
|
|
||||||
# GLU API is included in libGL.so under BeOS R5, not a separate libglu.so library
|
# External libraries:
|
||||||
<opengl>sgi-glu.o
|
be
|
||||||
|
game # BWindowScreen needed by BGLScreen stub class
|
||||||
# GLUT API is included in libGL.so under Haiku, not a separate libglut.so library
|
|
||||||
<opengl>glut.o
|
|
||||||
|
|
||||||
# External libs:
|
|
||||||
be
|
|
||||||
game # BWindowScreen needed by BGLScreen stub class
|
|
||||||
$(TARGET_LIBSTDC++)
|
$(TARGET_LIBSTDC++)
|
||||||
;
|
;
|
||||||
|
Loading…
Reference in New Issue
Block a user