From efd336887f9c46e66b304def0aa5fc5e16dc990f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 25 Feb 2008 14:46:53 +0900 Subject: [PATCH] Cleanup scons files. --- SConstruct | 23 ++++++++--------------- winddk.py | 20 +++++++++++++++++--- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/SConstruct b/SConstruct index 219997ca914..6d88d52f00d 100644 --- a/SConstruct +++ b/SConstruct @@ -120,21 +120,14 @@ Export([ if platform == 'winddk': - import ntpath - escape = env['ESCAPE'] - env.Tool('winddk', '.') - if 'BASEDIR' in os.environ: - WINDDK = os.environ['BASEDIR'] - else: - WINDDK = "C:\\WINDDK\\3790.1830" - # NOTE: We need this elaborate construct to get the absolute paths and - # forward slashes to msvc unharmed when cross compiling from posix platforms - #env.Append(CPPFLAGS = [ - # escape('/I' + ntpath.join(WINDDK, 'inc\\wxp')), - # escape('/I' + ntpath.join(WINDDK, 'inc\\ddk\\wxp')), - # escape('/I' + ntpath.join(WINDDK, 'inc\\ddk\\wdm\\wxp')), - # escape('/I' + ntpath.join(WINDDK, 'inc\\crt')), - #]) + env.Tool('winddk', ['.']) + + env.Append(CPPPATH = [ + env['SDK_INC_PATH'], + env['DDK_INC_PATH'], + env['WDM_INC_PATH'], + env['CRT_INC_PATH'], + ]) env.Append(CFLAGS = '/W3') if debug: diff --git a/winddk.py b/winddk.py index a54abf0e928..3dcf9027e5c 100644 --- a/winddk.py +++ b/winddk.py @@ -63,13 +63,27 @@ def get_winddk_paths(env, version=None): if 'BASEDIR' in os.environ: WINDDKdir = os.environ['BASEDIR'] else: - WINDDKdir = "C:\\WINDDK\\3790.1830" + #WINDDKdir = "C:\\WINDDK\\3790.1830" + WINDDKdir = "C:/WINDDK/3790.1830" exe_paths.append( os.path.join(WINDDKdir, 'bin') ) - exe_paths.append( os.path.join(WINDDKdir, 'bin\\x86') ) - include_paths.append( os.path.join(WINDDKdir, 'inc\\wxp') ) + exe_paths.append( os.path.join(WINDDKdir, 'bin/x86') ) + include_paths.append( os.path.join(WINDDKdir, 'inc/wxp') ) lib_paths.append( os.path.join(WINDDKdir, 'lib') ) + target_os = 'wxp' + target_cpu = 'i386' + + env['SDK_INC_PATH'] = os.path.join(WINDDKdir, 'inc', target_os) + env['CRT_INC_PATH'] = os.path.join(WINDDKdir, 'inc/crt') + env['DDK_INC_PATH'] = os.path.join(WINDDKdir, 'inc/ddk', target_os) + env['WDM_INC_PATH'] = os.path.join(WINDDKdir, 'inc/ddk/wdm', target_os) + + env['SDK_LIB_PATH'] = os.path.join(WINDDKdir, 'lib', target_os, target_cpu) + env['CRT_LIB_PATH'] = os.path.join(WINDDKdir, 'lib/crt', target_cpu) + env['DDK_LIB_PATH'] = os.path.join(WINDDKdir, 'lib', target_os, target_cpu) + env['WDM_LIB_PATH'] = os.path.join(WINDDKdir, 'lib', target_os, target_cpu) + include_path = string.join( include_paths, os.pathsep ) lib_path = string.join(lib_paths, os.pathsep ) exe_path = string.join(exe_paths, os.pathsep ) -- 2.30.2