Try to be smarter regarding $(TARGET_ARCH) dependent symbols when building libGL.so.
Untested for non x86 architecture. Axel, could you check if it now build fine under PPC? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17532 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+27
-17
@@ -6,7 +6,7 @@ UsePrivateHeaders opengl ;
|
|||||||
|
|
||||||
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 the public GL headers also when not compiling for Haiku.
|
# We need our public GL headers also when not compiling for Haiku.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -19,20 +19,30 @@ UseHeaders [ FDirName $(SUBDIR) mesa shader ] ;
|
|||||||
UseHeaders [ FDirName $(SUBDIR) mesa swrast ] ;
|
UseHeaders [ FDirName $(SUBDIR) mesa swrast ] ;
|
||||||
UseHeaders [ FDirName $(SUBDIR) mesa swrast_setup ] ;
|
UseHeaders [ FDirName $(SUBDIR) mesa swrast_setup ] ;
|
||||||
|
|
||||||
SubDirCcFlags
|
{
|
||||||
-DBEOS_THREADS
|
local defines ;
|
||||||
-DGNU_ASSEMBLER
|
defines = BEOS_THREADS GNU_ASSEMBLER ;
|
||||||
-DUSE_X86_ASM
|
|
||||||
-DUSE_MMX_ASM
|
if $(TARGET_ARCH) = x86 {
|
||||||
-DUSE_3DNOW_ASM
|
defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM USE_SSE_ASM ;
|
||||||
-DUSE_SSE_ASM ;
|
} else if $(TARGET_ARCH) = ppc {
|
||||||
SubDirC++Flags
|
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
||||||
-DBEOS_THREADS
|
# defines += USE_PPC_ASM ;
|
||||||
-DGNU_ASSEMBLER
|
}
|
||||||
-DUSE_X86_ASM
|
|
||||||
-DUSE_MMX_ASM
|
defines = [ FDefines $(defines) ] ;
|
||||||
-DUSE_3DNOW_ASM
|
SubDirCcFlags $(defines) ;
|
||||||
-DUSE_SSE_ASM ;
|
SubDirC++Flags $(defines) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
local arch_sources ;
|
||||||
|
if $(TARGET_ARCH) = x86 {
|
||||||
|
# On x86 platform, use the faster GL API dispatching assembly code!
|
||||||
|
arch_sources = glapi_x86.S ;
|
||||||
|
} else {
|
||||||
|
# For non-X86 platforms, no assembly code yet.
|
||||||
|
arch_sources = ;
|
||||||
|
}
|
||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) mesa $(TARGET_ARCH) ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) mesa $(TARGET_ARCH) ] ;
|
||||||
|
|
||||||
@@ -41,8 +51,8 @@ SharedLibrary libGL.so :
|
|||||||
GLDispatcher.cpp
|
GLDispatcher.cpp
|
||||||
GLRenderer.cpp
|
GLRenderer.cpp
|
||||||
|
|
||||||
# mesa/$(TARGET_ARCH)
|
# Mesa optimized GL dispatching code (if any) for this target architecture
|
||||||
glapi_$(TARGET_ARCH).S
|
$(arch_sources)
|
||||||
:
|
:
|
||||||
# GLU API is included in libGL.so under BeOS R5, not a separate libglu.so library
|
# GLU API is included in libGL.so under BeOS R5, not a separate libglu.so library
|
||||||
<opengl>sgi-glu.o
|
<opengl>sgi-glu.o
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
|
|||||||
|
|
||||||
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 the public GL headers also when not compiling for Haiku.
|
# We need our public GL headers also when not compiling for Haiku.
|
||||||
}
|
}
|
||||||
|
|
||||||
UseHeaders [ FDirName $(SUBDIR) include ] ;
|
UseHeaders [ FDirName $(SUBDIR) include ] ;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
|
|||||||
|
|
||||||
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 the public GL headers also when not compiling for Haiku.
|
# We need our public GL headers also when not compiling for Haiku.
|
||||||
}
|
}
|
||||||
|
|
||||||
MergeObject <opengl>glut.o :
|
MergeObject <opengl>glut.o :
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
|
|||||||
|
|
||||||
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 the public GL headers also when not compiling for Haiku.
|
# We need our not platform one, public GL headers also when not compiling for Haiku.
|
||||||
}
|
}
|
||||||
|
|
||||||
UsePrivateHeaders opengl ;
|
UsePrivateHeaders opengl ;
|
||||||
@@ -26,50 +26,73 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) swrast ] ;
|
|||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) swrast_setup ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) swrast_setup ] ;
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) tnl ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) tnl ] ;
|
||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) x86 ] ;
|
{
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) sparc ] ;
|
local defines ;
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) ppc ] ;
|
defines = BEOS_THREADS GNU_ASSEMBLER ;
|
||||||
|
|
||||||
|
if $(TARGET_ARCH) = x86 {
|
||||||
|
defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM USE_SSE_ASM ;
|
||||||
|
} else {
|
||||||
|
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
||||||
|
# defines += USE_PPC_ASM ;
|
||||||
|
}
|
||||||
|
|
||||||
SubDirCcFlags
|
defines = [ FDefines $(defines) ] ;
|
||||||
-DBEOS_THREADS
|
SubDirCcFlags $(defines) ;
|
||||||
-DGNU_ASSEMBLER
|
SubDirC++Flags $(defines) ;
|
||||||
-DUSE_X86_ASM
|
}
|
||||||
-DUSE_MMX_ASM
|
|
||||||
-DUSE_3DNOW_ASM
|
|
||||||
-DUSE_SSE_ASM ;
|
|
||||||
|
|
||||||
local archSources ;
|
|
||||||
|
|
||||||
|
local arch_sources ;
|
||||||
if $(TARGET_ARCH) = x86 {
|
if $(TARGET_ARCH) = x86 {
|
||||||
archSources =
|
|
||||||
|
arch_sources =
|
||||||
|
common_x86.c
|
||||||
common_x86_asm.S
|
common_x86_asm.S
|
||||||
x86_xform2.S
|
|
||||||
x86_xform3.S
|
x86.c
|
||||||
x86_xform4.S
|
x86_xform2.S
|
||||||
x86_cliptest.S
|
x86_xform3.S
|
||||||
mmx_blend.S
|
x86_xform4.S
|
||||||
3dnow_xform1.S
|
x86_cliptest.S
|
||||||
3dnow_xform2.S
|
mmx_blend.S
|
||||||
3dnow_xform3.S
|
3dnow.c
|
||||||
3dnow_xform4.S
|
3dnow_xform1.S
|
||||||
3dnow_normal.S
|
3dnow_xform2.S
|
||||||
sse_xform1.S
|
3dnow_xform3.S
|
||||||
sse_xform2.S
|
3dnow_xform4.S
|
||||||
sse_xform3.S
|
3dnow_normal.S
|
||||||
sse_xform4.S
|
sse.c
|
||||||
|
sse_xform1.S
|
||||||
|
sse_xform2.S
|
||||||
|
sse_xform3.S
|
||||||
|
sse_xform4.S
|
||||||
sse_normal.S
|
sse_normal.S
|
||||||
read_rgba_span_x86.S
|
read_rgba_span_x86.S
|
||||||
|
|
||||||
# tnl
|
|
||||||
t_vtx_x86_gcc.S
|
t_vtx_x86_gcc.S
|
||||||
;
|
;
|
||||||
} else {
|
|
||||||
archSources =
|
} else if $(TARGET_ARCH) = ppc {
|
||||||
|
|
||||||
|
arch_sources =
|
||||||
|
common_ppc.c
|
||||||
t_vtx_generic.c
|
t_vtx_generic.c
|
||||||
;
|
;
|
||||||
|
|
||||||
|
} else if $(TARGET_ARCH) = sparc {
|
||||||
|
|
||||||
|
arch_sources =
|
||||||
|
sparc.c
|
||||||
|
t_vtx_generic.c
|
||||||
|
;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
arch_sources = t_vtx_generic.c ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(TARGET_ARCH) ] ;
|
||||||
|
|
||||||
|
|
||||||
StaticLibrary libmesa.a :
|
StaticLibrary libmesa.a :
|
||||||
|
|
||||||
# main
|
# main
|
||||||
@@ -217,20 +240,8 @@ StaticLibrary libmesa.a :
|
|||||||
program.c
|
program.c
|
||||||
shaderobjects.c
|
shaderobjects.c
|
||||||
|
|
||||||
# x86
|
$(arch_sources)
|
||||||
common_x86.c
|
|
||||||
x86.c
|
|
||||||
3dnow.c
|
|
||||||
sse.c
|
|
||||||
|
|
||||||
# sparc
|
|
||||||
sparc.c
|
|
||||||
|
|
||||||
# ppc
|
|
||||||
common_ppc.c
|
|
||||||
|
|
||||||
$(archSources)
|
|
||||||
|
|
||||||
# glapi
|
# glapi
|
||||||
glapi.c
|
glapi.c
|
||||||
glthread.c
|
glthread.c
|
||||||
|
|||||||
Reference in New Issue
Block a user