diff options
Diffstat (limited to 'scons/gallium.py')
-rw-r--r-- | scons/gallium.py | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/scons/gallium.py b/scons/gallium.py index e2cd0546c1e..696ddd025ff 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -252,21 +252,24 @@ def generate(env): # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx, 'WIN32_LEAN_AND_MEAN', ] - if msvc: + if msvc and env['toolchain'] != 'winddk': cppdefines += [ 'VC_EXTRALEAN', '_CRT_SECURE_NO_DEPRECATE', ] if debug: cppdefines += ['_DEBUG'] - if platform == 'winddk': + if env['toolchain'] == 'winddk': # Mimic WINDDK's builtin flags. See also: # - WINDDK's bin/makefile.new i386mk.inc for more info. # - buildchk_wxp_x86.log files, generated by the WINDDK's build # - http://alter.org.ua/docs/nt_kernel/vc8_proj/ + if machine == 'x86': + cppdefines += ['_X86_', 'i386'] + if machine == 'x86_64': + cppdefines += ['_AMD64_', 'AMD64'] + if platform == 'winddk': cppdefines += [ - ('_X86_', '1'), - ('i386', '1'), 'STD_CALL', ('CONDITION_HANDLING', '1'), ('NT_INST', '0'), @@ -309,15 +312,6 @@ def generate(env): cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_CE_OGL'] env.Append(CPPDEFINES = cppdefines) - # C preprocessor includes - if platform == 'winddk': - env.Append(CPPPATH = [ - env['SDK_INC_PATH'], - env['DDK_INC_PATH'], - env['WDM_INC_PATH'], - env['CRT_INC_PATH'], - ]) - # C compiler options cflags = [] if gcc: |