From 0df858a8d541e342dfe569091b665c2a6dff7ef0 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 9 Mar 2010 17:57:13 +0000 Subject: [PATCH] gallium: create target for gdi libgl --- src/gallium/targets/libgl-gdi/SConscript | 51 ++++++++++++++++++ .../libgl-gdi}/gdi_llvmpipe_winsys.c | 0 .../libgl-gdi}/gdi_softpipe_winsys.c | 0 src/gallium/winsys/gdi/SConscript | 52 ++++--------------- src/gallium/winsys/gdi/gdi_sw_winsys.c | 2 +- 5 files changed, 63 insertions(+), 42 deletions(-) create mode 100644 src/gallium/targets/libgl-gdi/SConscript rename src/gallium/{winsys/gdi => targets/libgl-gdi}/gdi_llvmpipe_winsys.c (100%) rename src/gallium/{winsys/gdi => targets/libgl-gdi}/gdi_softpipe_winsys.c (100%) diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript new file mode 100644 index 00000000000..57704440ce7 --- /dev/null +++ b/src/gallium/targets/libgl-gdi/SConscript @@ -0,0 +1,51 @@ +####################################################################### +# SConscript for gdi winsys + +Import('*') + +if env['platform'] == 'windows': + + env = env.Clone() + + env.Append(CPPPATH = [ + '#src/gallium/state_trackers/wgl', + ]) + + env.Append(LIBS = [ + 'gdi32', + 'user32', + 'kernel32', + 'ws2_32', + ]) + + sources = [] + drivers = [] + + if 'softpipe' in env['drivers']: + sources = ['gdi_softpipe_winsys.c'] + drivers = [softpipe] + + if 'llvmpipe' in env['drivers']: + env.Tool('llvm') + if 'LLVM_VERSION' in env: + sources = ['gdi_llvmpipe_winsys.c'] + drivers = [llvmpipe] + + if not sources or not drivers: + print 'warning: softpipe or llvmpipe not selected, gdi winsys disabled' + Return() + + if env['gcc']: + sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def'] + else: + sources += ['#src/gallium/state_trackers/wgl/opengl32.def'] + + drivers += [trace] + + env['no_import_lib'] = 1 + + env.SharedLibrary( + target ='opengl32', + source = sources, + LIBS = wgl + ws_gdi + glapi + mesa + drivers + gallium + glsl + env['LIBS'], + ) diff --git a/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c b/src/gallium/targets/libgl-gdi/gdi_llvmpipe_winsys.c similarity index 100% rename from src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c rename to src/gallium/targets/libgl-gdi/gdi_llvmpipe_winsys.c diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c similarity index 100% rename from src/gallium/winsys/gdi/gdi_softpipe_winsys.c rename to src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c diff --git a/src/gallium/winsys/gdi/SConscript b/src/gallium/winsys/gdi/SConscript index 0a3f141e720..80f6c0e477b 100644 --- a/src/gallium/winsys/gdi/SConscript +++ b/src/gallium/winsys/gdi/SConscript @@ -1,5 +1,6 @@ ####################################################################### -# SConscript for gdi winsys +# SConscript for xlib winsys + Import('*') @@ -8,46 +9,15 @@ if env['platform'] == 'windows': env = env.Clone() env.Append(CPPPATH = [ - '#src/gallium/state_trackers/wgl', - ]) - - env.Append(LIBS = [ - 'gdi32', - 'user32', - 'kernel32', - 'ws2_32', + '#/src/gallium/include', + '#/src/gallium/auxiliary', + '#/src/gallium/drivers', ]) - sources = [] - drivers = [] - - if 'softpipe' in env['drivers']: - sources = ['gdi_sw_winsys.c', - 'gdi_softpipe_winsys.c'] - drivers = [softpipe] - - if 'llvmpipe' in env['drivers']: - env.Tool('llvm') - if 'LLVM_VERSION' in env: - sources = ['gdi_sw_winsys.c', - 'gdi_llvmpipe_winsys.c'] - drivers = [llvmpipe] - - if not sources or not drivers: - print 'warning: softpipe or llvmpipe not selected, gdi winsys disabled' - Return() - - if env['gcc']: - sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def'] - else: - sources += ['#src/gallium/state_trackers/wgl/opengl32.def'] - - drivers += [trace] - - env['no_import_lib'] = 1 - - env.SharedLibrary( - target ='opengl32', - source = sources, - LIBS = wgl + glapi + mesa + drivers + gallium + glsl + env['LIBS'], + ws_xlib = env.ConvenienceLibrary( + target = 'ws_gdi', + source = [ + 'gdi_sw_winsys.c', + ] ) + Export('ws_gdi') diff --git a/src/gallium/winsys/gdi/gdi_sw_winsys.c b/src/gallium/winsys/gdi/gdi_sw_winsys.c index 55f99c4f47d..f5c0b7d56ec 100644 --- a/src/gallium/winsys/gdi/gdi_sw_winsys.c +++ b/src/gallium/winsys/gdi/gdi_sw_winsys.c @@ -28,7 +28,7 @@ /** * @file - * LLVMpipe support. + * GDI software rasterizer support. * * @author Jose Fonseca */ -- 2.30.2