diff options
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/SConscript | 41 | ||||
-rw-r--r-- | src/gallium/targets/SConscript.dri | 32 | ||||
-rw-r--r-- | src/gallium/targets/dri-i915/SConscript | 8 | ||||
-rw-r--r-- | src/gallium/targets/dri-i965/SConscript | 8 | ||||
-rw-r--r-- | src/gallium/targets/dri-r300/SConscript | 8 | ||||
-rw-r--r-- | src/gallium/targets/dri-r600/SConscript | 8 | ||||
-rw-r--r-- | src/gallium/targets/dri-swrast/SConscript | 5 | ||||
-rw-r--r-- | src/gallium/targets/dri-vmwgfx/SConscript | 8 | ||||
-rw-r--r-- | src/gallium/targets/egl-gdi/SConscript | 92 | ||||
-rw-r--r-- | src/gallium/targets/graw-null/SConscript | 40 | ||||
-rw-r--r-- | src/gallium/targets/graw-null/graw_null.c | 69 | ||||
-rw-r--r-- | src/gallium/targets/graw-null/graw_util.c (renamed from src/gallium/targets/graw-xlib/graw_util.c) | 15 | ||||
-rw-r--r-- | src/gallium/targets/graw-xlib/SConscript | 19 | ||||
-rw-r--r-- | src/gallium/targets/libgl-gdi/SConscript | 85 | ||||
-rw-r--r-- | src/gallium/targets/libgl-xlib/SConscript | 27 | ||||
-rw-r--r-- | src/gallium/targets/xorg-vmwgfx/SConscript | 114 |
16 files changed, 200 insertions, 379 deletions
diff --git a/src/gallium/targets/SConscript b/src/gallium/targets/SConscript deleted file mode 100644 index e447d093610..00000000000 --- a/src/gallium/targets/SConscript +++ /dev/null @@ -1,41 +0,0 @@ -import os -Import('*') - -# Compatibility with old build scripts: -# -if 'mesa' in env['statetrackers']: - if 'xlib' in env['winsys'] and 'libgl-xlib' not in env['targets']: - env['targets'].append('libgl-xlib') - if 'gdi' in env['winsys'] and 'libgl-gdi' not in env['targets']: - env['targets'].append('libgl-gdi') - -if not 'graw-xlib' in env['targets'] and not 'graw-null' in env['targets'] and not env['msvc']: - # XXX: disable until MSVC can link correctly - SConscript('graw-null/SConscript') - - -if env['dri']: - SConscript([ - 'SConscript.dri' - ]) - -if 'xorg' in env['statetrackers']: - if 'vmware' in env['winsys']: - SConscript([ - 'xorg-vmwgfx/SConscript', - ]) - -if 'egl' in env['statetrackers']: - SConscript([ - 'egl-gdi/SConscript', - ]) - -# Ideally all non-target directories would produce convenience -# libraries, and the actual shared libraries and other installables -# would be finally assembled in the targets subtree: -# -for target in env['targets']: - SConscript(os.path.join(target, 'SConscript')) - - - diff --git a/src/gallium/targets/SConscript.dri b/src/gallium/targets/SConscript.dri index bc8d179e3d9..092223b3690 100644 --- a/src/gallium/targets/SConscript.dri +++ b/src/gallium/targets/SConscript.dri @@ -3,6 +3,9 @@ Import('*') +if not env['dri']: + Return() + drienv = env.Clone() drienv.Replace(CPPPATH = [ @@ -77,32 +80,3 @@ Export([ 'COMMON_DRI_SW_OBJECTS', 'COMMON_DRI_DRM_OBJECTS', ]) - -SConscript([ - 'dri-swrast/SConscript', -]) - -if 'vmware' in env['winsys']: - SConscript([ - 'dri-vmwgfx/SConscript', - ]) - -if 'i915' 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 'r600' in env['winsys']: - SConscript([ - 'dri-r600/SConscript', - ]) diff --git a/src/gallium/targets/dri-i915/SConscript b/src/gallium/targets/dri-i915/SConscript index 172f92d6b82..ab60013830e 100644 --- a/src/gallium/targets/dri-i915/SConscript +++ b/src/gallium/targets/dri-i915/SConscript @@ -1,9 +1,5 @@ Import('*') -if not 'i915' in env['drivers']: - print 'warning: i915 pipe driver not built skipping i915_dri.so' - Return() - env = drienv.Clone() env.ParseConfig('pkg-config --cflags --libs libdrm_intel') @@ -24,8 +20,10 @@ env.Prepend(LIBS = [ COMMON_DRI_DRM_OBJECTS ]) -env.LoadableModule( +module = env.LoadableModule( target = 'i915_dri.so', source = 'target.c', SHLIBPREFIX = '', ) + +env.Alias('dri-i915', module)
\ No newline at end of file diff --git a/src/gallium/targets/dri-i965/SConscript b/src/gallium/targets/dri-i965/SConscript index 684e3488f71..669f70d6b8d 100644 --- a/src/gallium/targets/dri-i965/SConscript +++ b/src/gallium/targets/dri-i965/SConscript @@ -1,9 +1,5 @@ Import('*') -if not 'i965' in env['drivers']: - print 'warning: i965 pipe driver not built skipping i965_dri.so' - Return() - env = drienv.Clone() env.ParseConfig('pkg-config --cflags --libs libdrm_intel') @@ -27,8 +23,10 @@ env.Prepend(LIBS = [ COMMON_DRI_DRM_OBJECTS ]) -env.LoadableModule( +module = env.LoadableModule( target = 'i965_dri.so', source = 'target.c', SHLIBPREFIX = '', ) + +env.Alias('dri-i965', module)
\ No newline at end of file diff --git a/src/gallium/targets/dri-r300/SConscript b/src/gallium/targets/dri-r300/SConscript index 33a458f2e68..005b4bbf7f1 100644 --- a/src/gallium/targets/dri-r300/SConscript +++ b/src/gallium/targets/dri-r300/SConscript @@ -1,9 +1,5 @@ Import('*') -if not 'r300' in env['drivers']: - print 'warning: r300 pipe driver not built skipping r300_dri.so' - Return() - env = drienv.Clone() env.ParseConfig('pkg-config --cflags --libs libdrm_radeon') @@ -23,8 +19,10 @@ env.Prepend(LIBS = [ COMMON_DRI_DRM_OBJECTS ]) -env.SharedLibrary( +module = env.SharedLibrary( target ='r300_dri.so', source = 'target.c', SHLIBPREFIX = '', ) + +env.Alias('dri-r300', module)
\ No newline at end of file diff --git a/src/gallium/targets/dri-r600/SConscript b/src/gallium/targets/dri-r600/SConscript index 64d6d2a7f6f..aa771db2d1a 100644 --- a/src/gallium/targets/dri-r600/SConscript +++ b/src/gallium/targets/dri-r600/SConscript @@ -1,9 +1,5 @@ Import('*') -if not 'r600' in env['drivers']: - print 'warning: r600 pipe driver not built skipping r600_dri.so' - Return() - env = drienv.Clone() env.ParseConfig('pkg-config --cflags --libs libdrm_radeon') @@ -22,8 +18,10 @@ env.Prepend(LIBS = [ COMMON_DRI_DRM_OBJECTS ]) -env.SharedLibrary( +module = env.SharedLibrary( target ='r600_dri.so', source = 'target.c', SHLIBPREFIX = '', ) + +env.Alias('dri-r600', module) diff --git a/src/gallium/targets/dri-swrast/SConscript b/src/gallium/targets/dri-swrast/SConscript index d8143471194..b67483800e4 100644 --- a/src/gallium/targets/dri-swrast/SConscript +++ b/src/gallium/targets/dri-swrast/SConscript @@ -27,15 +27,16 @@ if True: if env['llvm']: env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') - env.Tool('udis86') env.Prepend(LIBS = [llvmpipe]) swrastg_sources = [ 'swrast_drm_api.c' ] -env.LoadableModule( +module = env.LoadableModule( target ='swrastg_dri.so', source = swrastg_sources, SHLIBPREFIX = '', ) + +env.Alias('dri-swrast', module) diff --git a/src/gallium/targets/dri-vmwgfx/SConscript b/src/gallium/targets/dri-vmwgfx/SConscript index 7afabc7429f..7888e4f2c8b 100644 --- a/src/gallium/targets/dri-vmwgfx/SConscript +++ b/src/gallium/targets/dri-vmwgfx/SConscript @@ -1,9 +1,5 @@ Import('*') -if not 'svga' in env['drivers']: - print 'warning: svga pipe driver not built skipping vmwgfx_dri.so' - Return() - env = drienv.Clone() env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE']) @@ -20,8 +16,10 @@ env.Prepend(LIBS = [ COMMON_DRI_DRM_OBJECTS ]) -env.LoadableModule( +module = env.LoadableModule( target = 'vmwgfx_dri.so', source = 'target.c', SHLIBPREFIX = '', ) + +env.Alias('dri-vmwgfx', module)
\ No newline at end of file diff --git a/src/gallium/targets/egl-gdi/SConscript b/src/gallium/targets/egl-gdi/SConscript index 8f8b28ef67b..d52eeb70fd5 100644 --- a/src/gallium/targets/egl-gdi/SConscript +++ b/src/gallium/targets/egl-gdi/SConscript @@ -3,45 +3,53 @@ Import('*') -if env['platform'] == 'windows': - - env = env.Clone() - - env.Append(CPPPATH = [ - '#/src/gallium/state_trackers/egl', - '#/src/gallium/state_trackers/vega', - '#/src/egl/main', - '#/src/mesa', - ]) - - env.Append(CPPDEFINES = [ - 'FEATURE_VG=1', - 'GALLIUM_SOFTPIPE', - 'GALLIUM_RBUG', - 'GALLIUM_TRACE', - ]) - - env.Append(LIBS = [ - 'gdi32', - 'user32', - 'kernel32', - 'ws2_32', - ]) - - env['no_import_lib'] = 1 - - drivers = [softpipe] - if env['llvm']: - env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') - drivers += [llvmpipe] - drivers += [identity, trace, rbug] - - apis = [vgapi, st_vega] - - egl_gallium = env.SharedLibrary( - target ='egl_gallium', - source = 'egl-static.c', - LIBS = st_egl_gdi + ws_gdi + drivers + apis + gallium + egl + env['LIBS'], - ) - - env.InstallSharedLibrary(egl_gallium) +env = env.Clone() + +env.Append(CPPPATH = [ + '#/src/gallium/state_trackers/egl', + '#/src/gallium/state_trackers/vega', + '#/src/egl/main', + '#/src/mesa', +]) + +env.Append(CPPDEFINES = [ + 'FEATURE_VG=1', + 'GALLIUM_SOFTPIPE', + 'GALLIUM_RBUG', + 'GALLIUM_TRACE', +]) + +env.Append(LIBS = [ + 'gdi32', + 'user32', + 'kernel32', + 'ws2_32', +]) + +env.Prepend(LIBS = [ + st_egl_gdi, + ws_gdi, + identity, + trace, + rbug, + softpipe, + vgapi, + st_vega, + gallium, + egl, +]) + +if env['llvm']: + env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') + env.Prepend(LIBS = [llvmpipe]) + +egl_gallium = env.SharedLibrary( + target ='egl_gallium', + source = 'egl-static.c', +) + +env['no_import_lib'] = 1 + +egl_gdi = env.InstallSharedLibrary(egl_gallium) + +env.Alias('egl-gdi', egl_gdi) diff --git a/src/gallium/targets/graw-null/SConscript b/src/gallium/targets/graw-null/SConscript index 3416989d8eb..ebac1728f04 100644 --- a/src/gallium/targets/graw-null/SConscript +++ b/src/gallium/targets/graw-null/SConscript @@ -5,54 +5,28 @@ Import('*') env = env.Clone() -env.Prepend(LIBS = [ - ws_null, - trace, - rbug, - identity, -# gallium, -]) - -env.Append(CPPPATH = [ - '#src/gallium/drivers', -]) +graw_util = env.SharedObject( + source = ['graw_util.c'], +) -if env['platform'] == 'windows': - # For trace - env.Append(LIBS = [ - 'ws2_32', - ]) +env = env.Clone() sources = [ 'graw_null.c', - '../graw-xlib/graw_util.c', + graw_util, ] -if True: - env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE') - env.Prepend(LIBS = [softpipe]) - -if env['llvm']: - env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') - env.Tool('udis86') - env.Prepend(LIBS = [llvmpipe]) - -# Need this for trace, identity drivers referenced by -# gallium_wrap_screen(). -# env.Prepend(LIBS = [gallium]) # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions graw = env.SharedLibrary( - target ='graw', + target = 'graw', source = sources, ) -env.InstallSharedLibrary(graw, version=(1, 0)) - if env['platform'] == 'windows': graw = env.FindIxes(graw, 'LIBPREFIX', 'LIBSUFFIX') else: graw = env.FindIxes(graw, 'SHLIBPREFIX', 'SHLIBSUFFIX') -Export('graw') +Export('graw_util', 'graw') diff --git a/src/gallium/targets/graw-null/graw_null.c b/src/gallium/targets/graw-null/graw_null.c index 5939a5acd3c..f1fe3872c94 100644 --- a/src/gallium/targets/graw-null/graw_null.c +++ b/src/gallium/targets/graw-null/graw_null.c @@ -1,31 +1,5 @@ -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "util/u_memory.h" -#include "target-helpers/wrap_screen.h" -#include "sw/null/null_sw_winsys.h" -#include "os/os_time.h" #include "state_tracker/graw.h" -#ifdef GALLIUM_SOFTPIPE -#include "softpipe/sp_public.h" -#endif - -#ifdef GALLIUM_LLVMPIPE -#include "llvmpipe/lp_public.h" -#endif - -/* Haven't figured out a decent way to build the helper code yet - - * #include it here temporarily. - */ -#include "sw/sw_public.h" -#include "sw/sw.c" - -#include <stdio.h> - - -static struct { - void (*draw)(void); -} graw; @@ -37,45 +11,7 @@ graw_create_window_and_screen( int x, enum pipe_format format, void **handle) { - const char *default_driver; - const char *driver; - struct pipe_screen *screen = NULL; - struct sw_winsys *winsys = NULL; - static int dummy; - - - /* Create the underlying winsys, which performs presents to Xlib - * drawables: - */ - winsys = null_sw_create(); - if (winsys == NULL) - return NULL; - -#if defined(GALLIUM_LLVMPIPE) - default_driver = "llvmpipe"; -#elif defined(GALLIUM_SOFTPIPE) - default_driver = "softpipe"; -#else - default_driver = ""; -#endif - - driver = debug_get_option("GALLIUM_DRIVER", default_driver); - -#if defined(GALLIUM_LLVMPIPE) - if (screen == NULL && strcmp(driver, "llvmpipe") == 0) - screen = llvmpipe_create_screen( winsys ); -#endif - -#if defined(GALLIUM_SOFTPIPE) - if (screen == NULL) - screen = softpipe_create_screen( winsys ); -#endif - - *handle = &dummy; - - /* Inject any wrapping layers we want to here: - */ - return gallium_wrap_screen( screen ); + return NULL; } @@ -83,13 +19,10 @@ graw_create_window_and_screen( int x, void graw_set_display_func( void (*draw)( void ) ) { - graw.draw = draw; } void graw_main_loop( void ) { - graw.draw(); - os_time_sleep(100000); } diff --git a/src/gallium/targets/graw-xlib/graw_util.c b/src/gallium/targets/graw-null/graw_util.c index fc7c9ae6f92..531757f1457 100644 --- a/src/gallium/targets/graw-xlib/graw_util.c +++ b/src/gallium/targets/graw-null/graw_util.c @@ -9,8 +9,9 @@ /* Helper functions. These are the same for all graw implementations. */ -void *graw_parse_geometry_shader(struct pipe_context *pipe, - const char *text) +PUBLIC void * +graw_parse_geometry_shader(struct pipe_context *pipe, + const char *text) { struct tgsi_token tokens[1024]; struct pipe_shader_state state; @@ -22,8 +23,9 @@ void *graw_parse_geometry_shader(struct pipe_context *pipe, return pipe->create_gs_state(pipe, &state); } -void *graw_parse_vertex_shader(struct pipe_context *pipe, - const char *text) +PUBLIC void * +graw_parse_vertex_shader(struct pipe_context *pipe, + const char *text) { struct tgsi_token tokens[1024]; struct pipe_shader_state state; @@ -35,8 +37,9 @@ void *graw_parse_vertex_shader(struct pipe_context *pipe, return pipe->create_vs_state(pipe, &state); } -void *graw_parse_fragment_shader(struct pipe_context *pipe, - const char *text) +PUBLIC void * +graw_parse_fragment_shader(struct pipe_context *pipe, + const char *text) { struct tgsi_token tokens[1024]; struct pipe_shader_state state; diff --git a/src/gallium/targets/graw-xlib/SConscript b/src/gallium/targets/graw-xlib/SConscript index 21fce948f43..f7953097872 100644 --- a/src/gallium/targets/graw-xlib/SConscript +++ b/src/gallium/targets/graw-xlib/SConscript @@ -3,13 +3,8 @@ Import('*') -if env['platform'] != 'linux': - Return() - env = env.Clone() -env.Tool('x11') - env.Prepend(LIBS = [ ws_xlib, trace, @@ -18,26 +13,24 @@ env.Prepend(LIBS = [ # gallium, ]) +env.Prepend(LIBS = env['X11_LIBS']) + env.Append(CPPPATH = [ '#src/gallium/drivers', '#src/gallium/include/state_tracker', ]) - sources = [ 'graw_xlib.c', - 'graw_util.c', + graw_util ] -env.Tool('x11') - if True: env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE') env.Prepend(LIBS = [softpipe]) if env['llvm']: env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') - env.Tool('udis86') env.Prepend(LIBS = [llvmpipe]) # Need this for trace, identity drivers referenced by @@ -51,8 +44,6 @@ graw = env.SharedLibrary( source = sources, ) -env.InstallSharedLibrary(graw, version=(1, 0)) - -graw = env.FindIxes(graw, 'SHLIBPREFIX', 'SHLIBSUFFIX') +graw = env.InstallSharedLibrary(graw, version=(1, 0)) -Export('graw') +env.Alias('graw-xlib', graw) diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript index 12fe403f62f..339238756ab 100644 --- a/src/gallium/targets/libgl-gdi/SConscript +++ b/src/gallium/targets/libgl-gdi/SConscript @@ -3,45 +3,46 @@ Import('*') -if env['platform'] == 'windows': - - env = env.Clone() - - env.Append(CPPPATH = [ - '#src/gallium/state_trackers/wgl', - '#src/gallium/winsys/sw', - ]) - - env.Append(LIBS = [ - 'gdi32', - 'user32', - 'kernel32', - 'ws2_32', - talloc, - ]) - - sources = [] - drivers = [] - - if True: - sources = ['gdi_softpipe_winsys.c'] - drivers = [softpipe] - - if env['llvm']: - sources = ['gdi_llvmpipe_winsys.c'] - drivers = [llvmpipe] - - if env['gcc']: - sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def'] - else: - sources += ['#src/gallium/state_trackers/wgl/opengl32.def'] - - drivers += [trace, rbug] - - env['no_import_lib'] = 1 - - env.SharedLibrary( - target ='opengl32', - source = sources, - LIBS = wgl + ws_gdi + glapi + mesa + drivers + gallium + glsl + env['LIBS'], - ) +env = env.Clone() + +env.Append(CPPPATH = [ + '#src/gallium/state_trackers/wgl', + '#src/gallium/winsys/sw', +]) + +env.Append(LIBS = [ + 'gdi32', + 'user32', + 'kernel32', + 'ws2_32', + talloc, +]) + +sources = [] +drivers = [] + +if True: + sources = ['gdi_softpipe_winsys.c'] + drivers = [softpipe] + +if env['llvm']: + sources = ['gdi_llvmpipe_winsys.c'] + drivers = [llvmpipe] + +if env['gcc']: + sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def'] +else: + sources += ['#src/gallium/state_trackers/wgl/opengl32.def'] + +drivers += [trace, rbug] + +env['no_import_lib'] = 1 + +opengl32 = env.SharedLibrary( + target ='opengl32', + source = sources, + LIBS = wgl + ws_gdi + glapi + mesa + drivers + gallium + glsl + env['LIBS'], +) + +env.Alias('opengl32', opengl32) +env.Alias('libgl-gdi', opengl32) diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript index 27b562e1d5d..582760eac93 100644 --- a/src/gallium/targets/libgl-xlib/SConscript +++ b/src/gallium/targets/libgl-xlib/SConscript @@ -3,17 +3,6 @@ Import('*') -if env['platform'] != 'linux': - Return() - -if 'mesa' not in env['statetrackers']: - print 'warning: Mesa state tracker disabled: skipping build of xlib libGL.so' - Return() - -if env['dri']: - print 'warning: DRI enabled: skipping build of xlib libGL.so' - Return() - env = env.Clone() env.Append(CPPPATH = [ @@ -25,6 +14,8 @@ env.Append(CPPPATH = [ env.Append(CPPDEFINES = ['USE_XSHM']) +env.Prepend(LIBS = env['X11_LIBS']) + env.Prepend(LIBS = [ st_xlib, ws_xlib, @@ -42,8 +33,6 @@ sources = [ 'xlib.c', ] -env.Tool('x11') - if True: env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE') env.Prepend(LIBS = [softpipe]) @@ -54,10 +43,10 @@ if True: if env['llvm']: env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') - env.Tool('udis86') env.Prepend(LIBS = [llvmpipe]) -if 'cell' in env['drivers']: +if False: + # TODO: Detect Cell SDK env.Append(CPPDEFINES = 'GALLIUM_CELL') env.Prepend(LIBS = [cell]) @@ -67,6 +56,8 @@ libgl = env.SharedLibrary( source = sources, ) -if not env['dri']: - # Only install this libGL.so if DRI not enabled - env.InstallSharedLibrary(libgl, version=(1, 5)) +if True: + # XXX: Only install this libGL.so if DRI not enabled + libgl = env.InstallSharedLibrary(libgl, version=(1, 5)) + +env.Alias('libgl-xlib', libgl) diff --git a/src/gallium/targets/xorg-vmwgfx/SConscript b/src/gallium/targets/xorg-vmwgfx/SConscript index 43b2c74f9ce..0a81b33651f 100644 --- a/src/gallium/targets/xorg-vmwgfx/SConscript +++ b/src/gallium/targets/xorg-vmwgfx/SConscript @@ -2,62 +2,58 @@ import os.path Import('*') -if not 'svga' in env['drivers']: - print 'warning: svga pipe driver not built skipping vmwgfx_drv.so' - Return() - -if env['platform'] == 'linux': - - env = env.Clone() - - env.ParseConfig('pkg-config --cflags --libs libdrm xorg-server') - - env.Prepend(CPPPATH = [ - '#/include', - '#/src/gallium', - '#/src/mesa', - '#/src/gallium/drivers/svga', - '#/src/gallium/drivers/svga/include', - ]) - - env.Append(CPPDEFINES = [ - ]) - - if env['gcc']: - env.Append(CPPDEFINES = [ - 'HAVE_STDINT_H', - 'HAVE_SYS_TYPES_H', - ]) - - env.Append(CFLAGS = [ - '-std=gnu99', - '-D_FILE_OFFSET_BITS=64', - ]) - - env.Prepend(LIBPATH = [ - ]) - - env.Prepend(LIBS = [ - trace, - rbug, - st_xorg, - svgadrm, - svga, - gallium, - ]) - - sources = [ - 'vmw_ioctl.c', - 'vmw_ctrl.c', - 'vmw_screen.c', - 'vmw_video.c', - 'vmw_xorg.c', - ] - - # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions - env.LoadableModule( - target ='vmwgfx_drv.so', - source = sources, - LIBS = env['LIBS'], - SHLIBPREFIX = '', - ) +env = env.Clone() + +env.ParseConfig('pkg-config --cflags --libs libdrm xorg-server') + +env.Prepend(CPPPATH = [ + '#/include', + '#/src/gallium', + '#/src/mesa', + '#/src/gallium/drivers/svga', + '#/src/gallium/drivers/svga/include', +]) + +env.Append(CPPDEFINES = [ +]) + +if env['gcc']: + env.Append(CPPDEFINES = [ + 'HAVE_STDINT_H', + 'HAVE_SYS_TYPES_H', + ]) + +env.Append(CFLAGS = [ + '-std=gnu99', + '-D_FILE_OFFSET_BITS=64', +]) + +env.Prepend(LIBPATH = [ +]) + +env.Prepend(LIBS = [ + trace, + rbug, + st_xorg, + svgadrm, + svga, + gallium, +]) + +sources = [ + 'vmw_ioctl.c', + 'vmw_ctrl.c', + 'vmw_screen.c', + 'vmw_video.c', + 'vmw_xorg.c', +] + +# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions +module = env.LoadableModule( + target ='vmwgfx_drv.so', + source = sources, + LIBS = env['LIBS'], + SHLIBPREFIX = '', +) + +env.Alias('xorg-vmwgfx', module) |