Cleanup scons files.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 25 Feb 2008 05:46:53 +0000 (14:46 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 25 Feb 2008 05:46:53 +0000 (14:46 +0900)
SConstruct
winddk.py

index 219997ca914804f50cc1ee20a402bf52d0bd0bdd..6d88d52f00d9609e694d550a37c393d338151ca0 100644 (file)
@@ -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:
index a54abf0e92880899901c967ca8edff193b340cf8..3dcf9027e5cadc3f4413b646abfd549b1b8c10ec 100644 (file)
--- 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 )