@@ -14,3 +14,71 @@ if 'gdi' in env['winsys']: | |||
SConscript([ | |||
'libgl-gdi/SConscript', | |||
]) | |||
if env['dri']: | |||
drienv = env.Clone() | |||
drienv.Replace(CPPPATH = [ | |||
'#src/mesa/drivers/dri/common', | |||
'#include', | |||
'#include/GL/internal', | |||
'#src/gallium/include', | |||
'#src/gallium/auxiliary', | |||
'#src/gallium/drivers', | |||
'#src/mesa', | |||
'#src/mesa/main', | |||
'#src/mesa/glapi', | |||
'#src/mesa/math', | |||
'#src/mesa/transform', | |||
'#src/mesa/shader', | |||
'#src/mesa/swrast', | |||
'#src/mesa/swrast_setup', | |||
'#src/egl/main', | |||
'#src/egl/drivers/dri', | |||
]) | |||
drienv.ParseConfig('pkg-config --cflags --libs libdrm') | |||
COMMON_GALLIUM_SOURCES = [ | |||
'#src/mesa/drivers/dri/common/utils.c', | |||
'#src/mesa/drivers/dri/common/vblank.c', | |||
'#src/mesa/drivers/dri/common/dri_util.c', | |||
'#src/mesa/drivers/dri/common/xmlconfig.c', | |||
] | |||
COMMON_BM_SOURCES = [ | |||
'#src/mesa/drivers/dri/common/dri_bufmgr.c', | |||
'#src/mesa/drivers/dri/common/dri_drmpool.c', | |||
] | |||
Export([ | |||
'drienv', | |||
'COMMON_GALLIUM_SOURCES', | |||
'COMMON_BM_SOURCES', | |||
]) | |||
if 'vmware' in env['winsys']: | |||
SConscript([ | |||
'dri-vmwgfx/SConscript', | |||
]) | |||
if 'intel' in env['winsys']: | |||
SConscript([ | |||
'dri-i915/SConscript', | |||
]) | |||
if 'i965' in env['winsys']: | |||
SConscript([ | |||
'dri-i965/SConscript', | |||
]) | |||
if 'radeon' in env['winsys']: | |||
SConscript([ | |||
'dri-radeong/SConscript', | |||
]) | |||
if 'xorg' in env['statetrackers']: | |||
if 'vmware' in env['winsys']: | |||
SConscript([ | |||
'xorg-vmwgfx/SConscript', | |||
]) |
@@ -1,63 +1,20 @@ | |||
import os | |||
import os.path | |||
Import('*') | |||
if env['platform'] == 'linux': | |||
if env['dri']: | |||
env = env.Clone() | |||
sources = [ | |||
'#/src/mesa/drivers/dri/common/utils.c', | |||
'#/src/mesa/drivers/dri/common/vblank.c', | |||
'#/src/mesa/drivers/dri/common/dri_util.c', | |||
'#/src/mesa/drivers/dri/common/xmlconfig.c', | |||
] | |||
env.ParseConfig('pkg-config --cflags --libs libdrm') | |||
env.Prepend(CPPPATH = [ | |||
'#/src/mesa/state_tracker', | |||
'#/src/mesa/drivers/dri/common', | |||
'#/src/mesa/main', | |||
'#/src/mesa/glapi', | |||
'#/src/mesa', | |||
'#/include', | |||
'#/src/gallium/drivers/svga', | |||
'#/src/gallium/drivers/svga/include', | |||
]) | |||
env.Append(CPPDEFINES = [ | |||
'HAVE_STDINT_H', | |||
'HAVE_SYS_TYPES_H', | |||
]) | |||
env = drienv.Clone() | |||
env.Append(CFLAGS = [ | |||
'-std=gnu99', | |||
'-D_FILE_OFFSET_BITS=64', | |||
]) | |||
env.Prepend(LIBPATH = [ | |||
]) | |||
env.Prepend(LIBS = [ | |||
trace, | |||
st_dri, | |||
svgadrm, | |||
svga, | |||
mesa, | |||
glsl, | |||
gallium, | |||
]) | |||
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions | |||
env.LoadableModule( | |||
target ='vmwgfx_dri.so', | |||
source = sources, | |||
LIBS = env['LIBS'], | |||
SHLIBPREFIX = '', | |||
) | |||
drivers = [ | |||
trace, | |||
st_dri, | |||
svgadrm, | |||
svga, | |||
mesa, | |||
glsl, | |||
gallium, | |||
] | |||
env.LoadableModule( | |||
target ='vmwgfx_dri.so', | |||
source = COMMON_GALLIUM_SOURCES, | |||
LIBS = drivers + mesa + gallium + env['LIBS'], | |||
SHLIBPREFIX = '', | |||
) |
@@ -9,3 +9,24 @@ if 'gdi' in env['winsys']: | |||
SConscript([ | |||
'sw/gdi/SConscript', | |||
]) | |||
if env['dri']: | |||
if 'vmware' in env['winsys']: | |||
SConscript([ | |||
'svga/drm/SConscript', | |||
]) | |||
if 'intel' in env['winsys']: | |||
SConscript([ | |||
'i915/drm/SConscript', | |||
]) | |||
if 'i965' in env['winsys']: | |||
SConscript([ | |||
'i965/drm/SConscript', | |||
]) | |||
if 'radeon' in env['winsys']: | |||
SConscript([ | |||
'radeon/drm/SConscript', | |||
]) |
@@ -1,6 +1,6 @@ | |||
Import('*') | |||
env = drienv.Clone() | |||
env = env.Clone() | |||
inteldrm_sources = [ | |||
'intel_drm_api.c', |
@@ -1,6 +1,6 @@ | |||
Import('*') | |||
env = drienv.Clone() | |||
env = env.Clone() | |||
i965drm_sources = [ | |||
'i965_drm_api.c', |
@@ -1,6 +1,6 @@ | |||
Import('*') | |||
env = drienv.Clone() | |||
env = env.Clone() | |||
radeon_sources = [ | |||
'radeon_drm_buffer.c', |