st/mesa: fix incorrect RowStride computation
[mesa.git] / src / gallium / winsys / xlib / SConscript
1 #######################################################################
2 # SConscript for xlib winsys
3
4 Import('*')
5
6 if env['platform'] != 'linux':
7 Return()
8
9 if 'mesa' not in env['statetrackers']:
10 print 'warning: Mesa state tracker disabled: skipping build of xlib libGL.so'
11 Return()
12
13 if env['dri']:
14 print 'warning: DRI enabled: skipping build of xlib libGL.so'
15 Return()
16
17 if not set(('softpipe', 'llvmpipe', 'cell')).intersection(env['drivers']):
18 print 'warning: no supported pipe driver: skipping build of xlib libGL.so'
19 Return()
20
21 env = env.Clone()
22
23 env.Append(CPPPATH = [
24 '#/src/mesa',
25 '#/src/mesa/main',
26 '#src/gallium/state_trackers/glx/xlib',
27 ])
28
29 env.Append(CPPDEFINES = ['USE_XSHM'])
30
31 sources = [
32 'xlib.c',
33 ]
34
35 drivers = [trace]
36
37 if 'softpipe' in env['drivers']:
38 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
39 sources += ['xlib_softpipe.c']
40 drivers += [softpipe]
41
42 if 'llvmpipe' in env['drivers']:
43 env.Tool('llvm')
44 if 'LLVM_VERSION' in env:
45 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
46 env.Tool('udis86')
47 sources += ['xlib_llvmpipe.c']
48 drivers += [llvmpipe]
49
50 if 'cell' in env['drivers']:
51 env.Append(CPPDEFINES = 'GALLIUM_CELL')
52 sources += ['xlib_cell.c']
53 drivers += [cell]
54
55 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
56 libgl = env.SharedLibrary(
57 target ='GL',
58 source = sources,
59 LIBS = st_xlib + glapi + mesa + glsl + drivers + gallium + env['LIBS'],
60 )
61
62 if not env['dri']:
63 # Only install this libGL.so if DRI not enabled
64 env.InstallSharedLibrary(libgl, version=(1, 5))