diff options
author | José Fonseca <[email protected]> | 2008-11-18 19:13:32 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-11-20 23:01:43 +0900 |
commit | 15b92b09e0f066a9d38c445b80b33193a8d9ea14 (patch) | |
tree | b01a9d619faddd6722adb2f79b243cbe901141a3 /scons/gallium.py | |
parent | 59ae12b5b14a2bf18c4b566abcdf3211aa5eb4d6 (diff) |
scons: Support MinGW32 cross compiler.
To build an alternative opengl32.dll with Gallium's software-rasterizer from a
debian-based distribution run:
sudo apt-get install mingw32
scons platform=windows toolchain=crossmingw machine=x86 winsys=gdi dri=no
Diffstat (limited to 'scons/gallium.py')
-rw-r--r-- | scons/gallium.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/scons/gallium.py b/scons/gallium.py index 3631607e666..4622903edd2 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -170,21 +170,23 @@ def generate(env): #if env.get('quiet', False): # quietCommandLines(env) + # Toolchain + platform = env['platform'] + if env['toolchain'] == 'default': + if platform == 'winddk': + env['toolchain'] == 'winddk' + elif platform == 'wince': + env.Tool('wcesdk') + env['toolchain'] == 'wcesdk' + env.Tool(env['toolchain']) + # shortcuts debug = env['debug'] machine = env['machine'] platform = env['platform'] x86 = env['machine'] == 'x86' - gcc = env['platform'] in ('linux', 'freebsd', 'darwin') - msvc = env['platform'] in ('windows', 'winddk', 'wince') - - # Tool - if platform == 'winddk': - env.Tool('winddk') - elif platform == 'wince': - env.Tool('wcesdk') - else: - env.Tool('default') + gcc = env['platform'] in ('linux', 'freebsd', 'darwin') or env['toolchain'] == 'crossmingw' + msvc = env['platform'] in ('windows', 'winddk', 'wince') and env['toolchain'] != 'crossmingw' # Put build output in a separate dir, which depends on the current # configuration. See also http://www.scons.org/wiki/AdvancedBuildExample |