Commit 5a67df6d authored by José Fonseca's avatar José Fonseca

scons: Integrate gdi winsys.

Conditional build of the winsys based on the platform.
parent 7c22bb38
...@@ -36,7 +36,7 @@ if common.default_platform in ('linux', 'freebsd', 'darwin'): ...@@ -36,7 +36,7 @@ if common.default_platform in ('linux', 'freebsd', 'darwin'):
elif common.default_platform in ('winddk',): elif common.default_platform in ('winddk',):
default_statetrackers = 'all' default_statetrackers = 'all'
default_drivers = 'softpipe,i915simple' default_drivers = 'softpipe,i915simple'
default_winsys = 'none' default_winsys = 'all'
else: else:
default_statetrackers = 'all' default_statetrackers = 'all'
default_drivers = 'all' default_drivers = 'all'
...@@ -49,7 +49,7 @@ opts.Add(ListOption('statetrackers', 'state_trackers to build', default_statetra ...@@ -49,7 +49,7 @@ opts.Add(ListOption('statetrackers', 'state_trackers to build', default_statetra
opts.Add(ListOption('drivers', 'pipe drivers to build', default_drivers, opts.Add(ListOption('drivers', 'pipe drivers to build', default_drivers,
['softpipe', 'failover', 'i915simple', 'i965simple', 'cell'])) ['softpipe', 'failover', 'i915simple', 'i965simple', 'cell']))
opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys, opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys,
['xlib', 'intel'])) ['xlib', 'intel', 'gdi']))
env = Environment( env = Environment(
options = opts, options = opts,
......
Import('*') Import('*')
if 'intel' in env['winsys'] and dri: if env['dri']:
SConscript([ SConscript([
'dri/SConscript', 'dri/SConscript',
]) ])
if 'xlib' in env['winsys'] and not dri: if 'xlib' in env['winsys']:
SConscript([ SConscript([
'xlib/SConscript', 'xlib/SConscript',
]) ])
if 'gdi' in env['winsys']:
SConscript([
'gdi/SConscript',
])
Import('*') Import('*')
drienv = env.Clone() if env['dri']:
drienv.Replace(CPPPATH = [ drienv = env.Clone()
'#src/mesa/drivers/dri/common',
'#include', drienv.Replace(CPPPATH = [
'#include/GL/internal', '#src/mesa/drivers/dri/common',
'#src/gallium/include', '#include',
'#src/gallium/auxiliary', '#include/GL/internal',
'#src/gallium/drivers', '#src/gallium/include',
'#src/mesa', '#src/gallium/auxiliary',
'#src/mesa/main', '#src/gallium/drivers',
'#src/mesa/glapi', '#src/mesa',
'#src/mesa/math', '#src/mesa/main',
'#src/mesa/transform', '#src/mesa/glapi',
'#src/mesa/shader', '#src/mesa/math',
'#src/mesa/swrast', '#src/mesa/transform',
'#src/mesa/swrast_setup', '#src/mesa/shader',
'#src/egl/main', '#src/mesa/swrast',
'#src/egl/drivers/dri', '#src/mesa/swrast_setup',
]) '#src/egl/main',
'#src/egl/drivers/dri',
drienv.ParseConfig('pkg-config --cflags --libs libdrm') ])
COMMON_GALLIUM_SOURCES = [ drienv.ParseConfig('pkg-config --cflags --libs libdrm')
'#src/mesa/drivers/dri/common/utils.c',
'#src/mesa/drivers/dri/common/vblank.c', COMMON_GALLIUM_SOURCES = [
'#src/mesa/drivers/dri/common/dri_util.c', '#src/mesa/drivers/dri/common/utils.c',
'#src/mesa/drivers/dri/common/xmlconfig.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', COMMON_BM_SOURCES = [
] '#src/mesa/drivers/dri/common/dri_bufmgr.c',
'#src/mesa/drivers/dri/common/dri_drmpool.c',
Export([ ]
'drienv',
'COMMON_GALLIUM_SOURCES', Export([
'COMMON_BM_SOURCES', 'drienv',
]) 'COMMON_GALLIUM_SOURCES',
'COMMON_BM_SOURCES',
# TODO: Installation ])
#install: $(LIBNAME)
# $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR) # TODO: Installation
# $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR) #install: $(LIBNAME)
# $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
SConscript([ # $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
'intel/SConscript',
]) if 'intel' in env['winsys']:
SConscript([
'intel/SConscript',
])
Import('*') Import('*')
env = drienv.Clone() if 'mesa' in env['statetrackers']:
env.Append(CPPPATH = [ env = drienv.Clone()
'../intel',
'server' env.Append(CPPPATH = [
]) '../intel',
'server'
#MINIGLX_SOURCES = server/intel_dri.c ])
DRIVER_SOURCES = [ #MINIGLX_SOURCES = server/intel_dri.c
'intel_winsys_pipe.c',
'intel_winsys_softpipe.c', DRIVER_SOURCES = [
'intel_winsys_i915.c', 'intel_winsys_pipe.c',
'intel_batchbuffer.c', 'intel_winsys_softpipe.c',
'intel_swapbuffers.c', 'intel_winsys_i915.c',
'intel_context.c', 'intel_batchbuffer.c',
'intel_lock.c', 'intel_swapbuffers.c',
'intel_screen.c', 'intel_context.c',
'intel_batchpool.c', 'intel_lock.c',
] 'intel_screen.c',
'intel_batchpool.c',
sources = \ ]
COMMON_GALLIUM_SOURCES + \
COMMON_BM_SOURCES + \ sources = \
DRIVER_SOURCES COMMON_GALLIUM_SOURCES + \
COMMON_BM_SOURCES + \
drivers = [ DRIVER_SOURCES
softpipe,
i915simple drivers = [
] softpipe,
i915simple
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions ]
env.SharedLibrary(
target ='i915tex_dri.so', # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
source = sources, env.SharedLibrary(
LIBS = drivers + mesa + auxiliaries + env['LIBS'], target ='i915tex_dri.so',
) source = sources,
\ No newline at end of file LIBS = drivers + mesa + auxiliaries + env['LIBS'],
)
...@@ -3,30 +3,32 @@ ...@@ -3,30 +3,32 @@
Import('*') Import('*')
env = env.Clone() if env['platform'] == 'linux' and 'mesa' in env['statetrackers'] and not env['dri']:
env.Append(CPPPATH = [ env = env.Clone()
'#/src/mesa',
'#/src/mesa/main',
])
sources = [ env.Append(CPPPATH = [
'glxapi.c', '#/src/mesa',
'fakeglx.c', '#/src/mesa/main',
'xfonts.c', ])
'xm_api.c',
'xm_winsys.c',
'xm_winsys_aub.c',
'brw_aub.c',
]
drivers = [
softpipe,
]
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions sources = [
env.SharedLibrary( 'glxapi.c',
target ='GL', 'fakeglx.c',
source = sources, 'xfonts.c',
LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'], 'xm_api.c',
) 'xm_winsys.c',
'xm_winsys_aub.c',
'brw_aub.c',
]
drivers = [
softpipe,
]
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
env.SharedLibrary(
target ='GL',
source = sources,
LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment