Merge commit 'origin/perrtblend'
[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']:
7
8 env = env.Clone()
9
10 env.Tool('python')
11
12 env.Tool('swig')
13 env.Append(SWIGPATH = ['#src/gallium/include', '#src/gallium/include/pipe'])
14 env.Append(SWIGFLAGS = ['-python', '-keyword'])
15
16 env.Append(CPPPATH = '.')
17
18 if env['platform'] == 'windows':
19 env.Append(LIBS = [
20 'opengl32',
21 'gdi32',
22 'user32',
23 'kernel32',
24 'ws2_32',
25 ])
26 else:
27 env.Append(LIBS = [
28 'GL',
29 'X11',
30 ])
31
32 sources = [
33 'gallium.i',
34 'st_device.c',
35 'st_sample.c',
36 ]
37
38 drivers = [
39 trace
40 ]
41
42 if 'llvmpipe' in env['drivers']:
43 env.Tool('llvm')
44 sources += ['st_llvmpipe_winsys.c']
45 drivers += [llvmpipe]
46 else:
47 sources += ['st_softpipe_winsys.c']
48 drivers += [softpipe]
49
50 pyst = env.ConvenienceLibrary(
51 target = 'pyst',
52 source = sources,
53 )
54
55 env['no_import_lib'] = 1
56
57 env.SharedLibrary(
58 target = '_gallium',
59 source = [
60 'st_hardpipe_winsys.c',
61 ],
62 LIBS = [pyst] + drivers + gallium + env['LIBS'],
63 )