Merge commit 'origin/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']:
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(CPPDEFINES = ['GCC_HASCLASSVISIBILITY'])
28 env.Append(LIBS = [
29 'GL',
30 'X11',
31 ])
32
33 sources = [
34 'gallium.i',
35 'st_device.c',
36 'st_sample.c',
37 'st_hardpipe_winsys.c',
38 'st_softpipe_winsys.c',
39 ]
40
41 env.Prepend(LIBS = [
42 ws_null,
43 trace,
44 gallium,
45 ])
46
47 if env['llvm']:
48 env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
49 env.Prepend(LIBS = [llvmpipe])
50 if True:
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 )