8010f122b73e4d72bb068b81a540268fec86e3b0
[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 'st_hardpipe_winsys.c',
37 'st_softpipe_winsys.c',
38 ]
39
40 env.Prepend(LIBS = [
41 trace,
42 gallium
43 ])
44
45 if 'llvmpipe' in env['drivers']:
46 env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
47 env.Tool('llvm')
48 env.Prepend(LIBS = [llvmpipe])
49 if 'softpipe' in env['drivers']:
50 env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
51 env.Prepend(LIBS = [softpipe])
52
53 env['no_import_lib'] = 1
54
55 env.SharedLibrary(
56 target = '_gallium',
57 source = sources,
58 )