Merge branch '7.8'
[mesa.git] / src / gallium / state_trackers / python / SConscript
1 import sys
2 import os.path
3
4 Import('*')
5
6 if 'python' in env['statetrackers'] and 0:
7 # FIXME: Disable python state tracker until transfers are done by contexts
8
9 env = env.Clone()
10
11 env.Tool('python')
12
13 env.Tool('swig')
14 env.Append(SWIGPATH = ['#src/gallium/include', '#src/gallium/include/pipe'])
15 env.Append(SWIGFLAGS = ['-python', '-keyword'])
16
17 env.Append(CPPPATH = '.')
18
19 if env['platform'] == 'windows':
20 env.Append(LIBS = [
21 'opengl32',
22 'gdi32',
23 'user32',
24 'kernel32',
25 'ws2_32',
26 ])
27 else:
28 env.Append(CPPDEFINES = ['GCC_HASCLASSVISIBILITY'])
29 env.Append(LIBS = [
30 'GL',
31 'X11',
32 ])
33
34 sources = [
35 'gallium.i',
36 'st_device.c',
37 'st_sample.c',
38 'st_hardpipe_winsys.c',
39 'st_softpipe_winsys.c',
40 ]
41
42 env.Prepend(LIBS = [
43 ws_null,
44 trace,
45 gallium,
46 ])
47
48 if 'llvmpipe' in env['drivers']:
49 env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
50 env.Tool('llvm')
51 env.Prepend(LIBS = [llvmpipe])
52 if 'softpipe' in env['drivers']:
53 env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
54 env.Prepend(LIBS = [softpipe])
55
56 env['no_import_lib'] = 1
57
58 env.SharedLibrary(
59 target = '_gallium',
60 source = sources,
61 )