diff options
author | José Fonseca <[email protected]> | 2008-11-18 19:13:32 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-11-18 19:13:32 +0900 |
commit | 6cf59e1293c5777ba5675e6315cbfad3211f9260 (patch) | |
tree | 26a64dee5da58421c6e4e70456d379d1c0519e74 /scons/gallium.py | |
parent | e45773b3de1bbd7db717336a1b5c964b6cdb718e (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 c9d5368989a..f7ac5e543e3 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -170,22 +170,24 @@ 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' ppc = env['machine'] == 'ppc' - 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 |