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" {
|
||||
|
||||
#include "glapi.h"
|
||||
#include "glapi_priv.h"
|
||||
#include "glapitable.h"
|
||||
|
||||
/*
|
||||
|
@ -3,8 +3,11 @@
|
||||
|
||||
|
||||
#include <BeBuild.h>
|
||||
#include <GL/gl.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include "glheader.h"
|
||||
|
||||
extern "C" {
|
||||
#include "glapi.h"
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <DirectWindow.h>
|
||||
|
@ -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
|
||||
<mesa>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
|
||||
<opengl>sgi-glu.o
|
||||
|
||||
# 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
|
||||
# External libraries:
|
||||
be
|
||||
game # BWindowScreen needed by BGLScreen stub class
|
||||
$(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user