summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/python
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-11-01 13:30:22 +0000
committerJosé Fonseca <[email protected]>2010-11-01 13:30:22 +0000
commit601498ae73e654c2de997ea75075613a694d604d (patch)
treefb1eb85143f5222b3c4b4d059276095e658506f5 /src/gallium/state_trackers/python
parenta84bd587c68a48c675aae538934a0de48421ff08 (diff)
scons: Revamp how to specify targets to build.
Use scons target and dependency system instead of ad-hoc options. Now is simply a matter of naming what to build. For example: scons libgl-xlib scons libgl-gdi scons graw-progs scons llvmpipe and so on. And there is also the possibility of scepcified subdirs, e.g. scons src/gallium/drivers If nothing is specified then everything will be build. There might be some rough corners over the next days. Please bare with me.
Diffstat (limited to 'src/gallium/state_trackers/python')
-rw-r--r--src/gallium/state_trackers/python/SConscript106
1 files changed, 55 insertions, 51 deletions
diff --git a/src/gallium/state_trackers/python/SConscript b/src/gallium/state_trackers/python/SConscript
index aadeaa0a359..5cb7960f9b5 100644
--- a/src/gallium/state_trackers/python/SConscript
+++ b/src/gallium/state_trackers/python/SConscript
@@ -3,57 +3,61 @@ 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['toolchain'] == 'crossmingw':
+ # Cross-compilation not supported
+ Return()
+
+env = env.Clone()
+
+env.Tool('python')
- if env['llvm']:
- env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
- env.Prepend(LIBS = [llvmpipe])
- if True:
- env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
- env.Prepend(LIBS = [softpipe])
+env.Tool('swig')
+env.Append(SWIGPATH = ['#src/gallium/include', '#src/gallium/include/pipe'])
+env.Append(SWIGFLAGS = ['-python', '-keyword'])
- env['no_import_lib'] = 1
+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',
+ ])
- env.SharedLibrary(
- target = '_gallium',
- source = sources,
- )
+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
+
+pyst = env.SharedLibrary(
+ target = '_gallium',
+ source = sources,
+)
+
+env.Alias('python', pyst)