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:
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 )