From 26e27ba30884be927cf1bc21d39f32d6096a6678 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 25 Mar 2009 19:24:16 +0000 Subject: scons: Support building with the Windows SDK. x86_64 is also supported. --- scons/generic.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scons/generic.py') diff --git a/scons/generic.py b/scons/generic.py index 01a374e363..764b626e58 100644 --- a/scons/generic.py +++ b/scons/generic.py @@ -303,14 +303,17 @@ def generate(env): # Load tool chain env.Tool(env['toolchain']) + env['gcc'] = 'gcc' in os.path.basename(env['CC']).split('-') + env['msvc'] = env['CC'] == 'cl' + # 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') or env['toolchain'] == 'crossmingw' - msvc = env['platform'] in ('windows', 'winddk', 'wince') and env['toolchain'] != 'crossmingw' + gcc = env['gcc'] + msvc = env['msvc'] # C preprocessor options cppdefines = [] -- cgit v1.2.3 From b3e03ede3eeb224a2c293ae924ffa58f1de7e84a Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 25 Mar 2009 19:32:54 +0000 Subject: scons: Move MSVC specific away from Mingw builds. --- scons/gallium.py | 7 +++++-- scons/generic.py | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'scons/generic.py') diff --git a/scons/gallium.py b/scons/gallium.py index ed4f49c1d8..e2cd0546c1 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -251,9 +251,12 @@ def generate(env): ('WINVER', '0x0501'), # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx, 'WIN32_LEAN_AND_MEAN', - 'VC_EXTRALEAN', - '_CRT_SECURE_NO_DEPRECATE', ] + if msvc: + cppdefines += [ + 'VC_EXTRALEAN', + '_CRT_SECURE_NO_DEPRECATE', + ] if debug: cppdefines += ['_DEBUG'] if platform == 'winddk': diff --git a/scons/generic.py b/scons/generic.py index 764b626e58..03563e4c62 100644 --- a/scons/generic.py +++ b/scons/generic.py @@ -331,9 +331,12 @@ def generate(env): #'UNICODE', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx, #'WIN32_LEAN_AND_MEAN', - 'VC_EXTRALEAN', - '_CRT_SECURE_NO_DEPRECATE', ] + if msvc: + cppdefines += [ + 'VC_EXTRALEAN', + '_CRT_SECURE_NO_DEPRECATE', + ] if debug: cppdefines += ['_DEBUG'] if platform == 'winddk': -- cgit v1.2.3