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:
Philippe Houdoin
2006-05-22 15:48:12 +00:00
parent 568e0bdbf4
commit d6b1b60ed4
4 changed files with 86 additions and 65 deletions
+27 -17
View File
@@ -6,7 +6,7 @@ UsePrivateHeaders opengl ;
if $(TARGET_PLATFORM) != haiku {
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_setup ] ;
SubDirCcFlags
-DBEOS_THREADS
-DGNU_ASSEMBLER
-DUSE_X86_ASM
-DUSE_MMX_ASM
-DUSE_3DNOW_ASM
-DUSE_SSE_ASM ;
SubDirC++Flags
-DBEOS_THREADS
-DGNU_ASSEMBLER
-DUSE_X86_ASM
-DUSE_MMX_ASM
-DUSE_3DNOW_ASM
-DUSE_SSE_ASM ;
{
local defines ;
defines = BEOS_THREADS GNU_ASSEMBLER ;
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 ;
}
defines = [ FDefines $(defines) ] ;
SubDirCcFlags $(defines) ;
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) ] ;
@@ -41,8 +51,8 @@ SharedLibrary libGL.so :
GLDispatcher.cpp
GLRenderer.cpp
# mesa/$(TARGET_ARCH)
glapi_$(TARGET_ARCH).S
# Mesa optimized GL dispatching code (if any) for this target architecture
$(arch_sources)
:
# GLU API is included in libGL.so under BeOS R5, not a separate libglu.so library
<opengl>sgi-glu.o
+1 -1
View File
@@ -4,7 +4,7 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
if $(TARGET_PLATFORM) != haiku {
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 ] ;
+1 -1
View File
@@ -4,7 +4,7 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
if $(TARGET_PLATFORM) != haiku {
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 :
+57 -46
View File
@@ -4,7 +4,7 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
if $(TARGET_PLATFORM) != haiku {
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 ;
@@ -26,50 +26,73 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) swrast ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) swrast_setup ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) tnl ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) x86 ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) sparc ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) ppc ] ;
{
local defines ;
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
-DBEOS_THREADS
-DGNU_ASSEMBLER
-DUSE_X86_ASM
-DUSE_MMX_ASM
-DUSE_3DNOW_ASM
-DUSE_SSE_ASM ;
local archSources ;
defines = [ FDefines $(defines) ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
}
local arch_sources ;
if $(TARGET_ARCH) = x86 {
archSources =
arch_sources =
common_x86.c
common_x86_asm.S
x86_xform2.S
x86_xform3.S
x86_xform4.S
x86_cliptest.S
mmx_blend.S
3dnow_xform1.S
3dnow_xform2.S
3dnow_xform3.S
3dnow_xform4.S
3dnow_normal.S
sse_xform1.S
sse_xform2.S
sse_xform3.S
sse_xform4.S
x86.c
x86_xform2.S
x86_xform3.S
x86_xform4.S
x86_cliptest.S
mmx_blend.S
3dnow.c
3dnow_xform1.S
3dnow_xform2.S
3dnow_xform3.S
3dnow_xform4.S
3dnow_normal.S
sse.c
sse_xform1.S
sse_xform2.S
sse_xform3.S
sse_xform4.S
sse_normal.S
read_rgba_span_x86.S
# tnl
t_vtx_x86_gcc.S
;
} else {
archSources =
;
} else if $(TARGET_ARCH) = ppc {
arch_sources =
common_ppc.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 :
# main
@@ -217,20 +240,8 @@ StaticLibrary libmesa.a :
program.c
shaderobjects.c
# x86
common_x86.c
x86.c
3dnow.c
sse.c
$(arch_sources)
# sparc
sparc.c
# ppc
common_ppc.c
$(archSources)
# glapi
glapi.c
glthread.c