mesa/src/gallium/state_trackers/python/SConscript
José Fonseca 47a89e9255 scons: Always build softpipe and llvmpipe (when llvm available).
These are our reference software rasterizers. They can build everywhere
and are a precious debugging tool.

Making them always present immensily simplifies the scons logic.

If people want to avoid building it is still possible to pass
direcotries and target names to scons to narrow the build.
2010-04-11 17:17:35 +09:00

59 lines
1.2 KiB
Python

import sys
import os.path
Import('*')
if 'python' in env['statetrackers']:
env = env.Clone()
env.Tool('python')
env.Tool('swig')
env.Append(SWIGPATH = ['#src/gallium/include', '#src/gallium/include/pipe'])
env.Append(SWIGFLAGS = ['-python', '-keyword'])
env.Append(CPPPATH = '.')
if env['platform'] == 'windows':
env.Append(LIBS = [
'opengl32',
'gdi32',
'user32',
'kernel32',
'ws2_32',
])
else:
env.Append(CPPDEFINES = ['GCC_HASCLASSVISIBILITY'])
env.Append(LIBS = [
'GL',
'X11',
])
sources = [
'gallium.i',
'st_device.c',
'st_sample.c',
'st_hardpipe_winsys.c',
'st_softpipe_winsys.c',
]
env.Prepend(LIBS = [
ws_null,
trace,
gallium,
])
if env['llvm']:
env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
env.Prepend(LIBS = [llvmpipe])
if True:
env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
env.Prepend(LIBS = [softpipe])
env['no_import_lib'] = 1
env.SharedLibrary(
target = '_gallium',
source = sources,
)