python: More build fixes.
[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 ws_null,
42 trace,
43 gallium,
44 ])
45
46 if 'llvmpipe' in env['drivers']:
47 env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
48 env.Tool('llvm')
49 env.Prepend(LIBS = [llvmpipe])
50 if 'softpipe' in env['drivers']:
51 env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
52 env.Prepend(LIBS = [softpipe])
53
54 env['no_import_lib'] = 1
55
56 env.SharedLibrary(
57 target = '_gallium',
58 source = sources,
59 )