scons: Integrate gdi winsys.
Conditional build of the winsys based on the platform.
This commit is contained in:
parent
7c22bb383a
commit
5a67df6d7c
|
@ -36,7 +36,7 @@ if common.default_platform in ('linux', 'freebsd', 'darwin'):
|
|||
elif common.default_platform in ('winddk',):
|
||||
default_statetrackers = 'all'
|
||||
default_drivers = 'softpipe,i915simple'
|
||||
default_winsys = 'none'
|
||||
default_winsys = 'all'
|
||||
else:
|
||||
default_statetrackers = 'all'
|
||||
default_drivers = 'all'
|
||||
|
@ -49,7 +49,7 @@ opts.Add(ListOption('statetrackers', 'state_trackers to build', default_statetra
|
|||
opts.Add(ListOption('drivers', 'pipe drivers to build', default_drivers,
|
||||
['softpipe', 'failover', 'i915simple', 'i965simple', 'cell']))
|
||||
opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys,
|
||||
['xlib', 'intel']))
|
||||
['xlib', 'intel', 'gdi']))
|
||||
|
||||
env = Environment(
|
||||
options = opts,
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
Import('*')
|
||||
|
||||
if 'intel' in env['winsys'] and dri:
|
||||
if env['dri']:
|
||||
SConscript([
|
||||
'dri/SConscript',
|
||||
])
|
||||
|
||||
if 'xlib' in env['winsys'] and not dri:
|
||||
if 'xlib' in env['winsys']:
|
||||
SConscript([
|
||||
'xlib/SConscript',
|
||||
])
|
||||
|
||||
if 'gdi' in env['winsys']:
|
||||
SConscript([
|
||||
'gdi/SConscript',
|
||||
])
|
||||
|
|
|
@ -1,51 +1,54 @@
|
|||
Import('*')
|
||||
|
||||
drienv = env.Clone()
|
||||
if env['dri']:
|
||||
|
||||
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 = env.Clone()
|
||||
|
||||
drienv.ParseConfig('pkg-config --cflags --libs libdrm')
|
||||
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',
|
||||
])
|
||||
|
||||
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',
|
||||
]
|
||||
drienv.ParseConfig('pkg-config --cflags --libs libdrm')
|
||||
|
||||
COMMON_BM_SOURCES = [
|
||||
'#src/mesa/drivers/dri/common/dri_bufmgr.c',
|
||||
'#src/mesa/drivers/dri/common/dri_drmpool.c',
|
||||
]
|
||||
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',
|
||||
]
|
||||
|
||||
Export([
|
||||
'drienv',
|
||||
'COMMON_GALLIUM_SOURCES',
|
||||
'COMMON_BM_SOURCES',
|
||||
])
|
||||
COMMON_BM_SOURCES = [
|
||||
'#src/mesa/drivers/dri/common/dri_bufmgr.c',
|
||||
'#src/mesa/drivers/dri/common/dri_drmpool.c',
|
||||
]
|
||||
|
||||
# TODO: Installation
|
||||
#install: $(LIBNAME)
|
||||
# $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
|
||||
# $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
|
||||
Export([
|
||||
'drienv',
|
||||
'COMMON_GALLIUM_SOURCES',
|
||||
'COMMON_BM_SOURCES',
|
||||
])
|
||||
|
||||
SConscript([
|
||||
'intel/SConscript',
|
||||
])
|
||||
# TODO: Installation
|
||||
#install: $(LIBNAME)
|
||||
# $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
|
||||
# $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
|
||||
|
||||
if 'intel' in env['winsys']:
|
||||
SConscript([
|
||||
'intel/SConscript',
|
||||
])
|
||||
|
|
|
@ -1,39 +1,41 @@
|
|||
Import('*')
|
||||
|
||||
env = drienv.Clone()
|
||||
if 'mesa' in env['statetrackers']:
|
||||
|
||||
env.Append(CPPPATH = [
|
||||
'../intel',
|
||||
'server'
|
||||
])
|
||||
env = drienv.Clone()
|
||||
|
||||
#MINIGLX_SOURCES = server/intel_dri.c
|
||||
env.Append(CPPPATH = [
|
||||
'../intel',
|
||||
'server'
|
||||
])
|
||||
|
||||
DRIVER_SOURCES = [
|
||||
'intel_winsys_pipe.c',
|
||||
'intel_winsys_softpipe.c',
|
||||
'intel_winsys_i915.c',
|
||||
'intel_batchbuffer.c',
|
||||
'intel_swapbuffers.c',
|
||||
'intel_context.c',
|
||||
'intel_lock.c',
|
||||
'intel_screen.c',
|
||||
'intel_batchpool.c',
|
||||
]
|
||||
#MINIGLX_SOURCES = server/intel_dri.c
|
||||
|
||||
sources = \
|
||||
COMMON_GALLIUM_SOURCES + \
|
||||
COMMON_BM_SOURCES + \
|
||||
DRIVER_SOURCES
|
||||
DRIVER_SOURCES = [
|
||||
'intel_winsys_pipe.c',
|
||||
'intel_winsys_softpipe.c',
|
||||
'intel_winsys_i915.c',
|
||||
'intel_batchbuffer.c',
|
||||
'intel_swapbuffers.c',
|
||||
'intel_context.c',
|
||||
'intel_lock.c',
|
||||
'intel_screen.c',
|
||||
'intel_batchpool.c',
|
||||
]
|
||||
|
||||
drivers = [
|
||||
softpipe,
|
||||
i915simple
|
||||
]
|
||||
sources = \
|
||||
COMMON_GALLIUM_SOURCES + \
|
||||
COMMON_BM_SOURCES + \
|
||||
DRIVER_SOURCES
|
||||
|
||||
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
|
||||
env.SharedLibrary(
|
||||
target ='i915tex_dri.so',
|
||||
source = sources,
|
||||
LIBS = drivers + mesa + auxiliaries + env['LIBS'],
|
||||
)
|
||||
drivers = [
|
||||
softpipe,
|
||||
i915simple
|
||||
]
|
||||
|
||||
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
|
||||
env.SharedLibrary(
|
||||
target ='i915tex_dri.so',
|
||||
source = sources,
|
||||
LIBS = drivers + mesa + auxiliaries + env['LIBS'],
|
||||
)
|
||||
|
|
|
@ -3,30 +3,32 @@
|
|||
|
||||
Import('*')
|
||||
|
||||
env = env.Clone()
|
||||
if env['platform'] == 'linux' and 'mesa' in env['statetrackers'] and not env['dri']:
|
||||
|
||||
env.Append(CPPPATH = [
|
||||
'#/src/mesa',
|
||||
'#/src/mesa/main',
|
||||
])
|
||||
env = env.Clone()
|
||||
|
||||
sources = [
|
||||
'glxapi.c',
|
||||
'fakeglx.c',
|
||||
'xfonts.c',
|
||||
'xm_api.c',
|
||||
'xm_winsys.c',
|
||||
'xm_winsys_aub.c',
|
||||
'brw_aub.c',
|
||||
]
|
||||
|
||||
drivers = [
|
||||
softpipe,
|
||||
]
|
||||
env.Append(CPPPATH = [
|
||||
'#/src/mesa',
|
||||
'#/src/mesa/main',
|
||||
])
|
||||
|
||||
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
|
||||
env.SharedLibrary(
|
||||
target ='GL',
|
||||
source = sources,
|
||||
LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
|
||||
)
|
||||
sources = [
|
||||
'glxapi.c',
|
||||
'fakeglx.c',
|
||||
'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
|
||||
env.SharedLibrary(
|
||||
target ='GL',
|
||||
source = sources,
|
||||
LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue