default_statetrackers = 'mesa'
default_drivers = 'softpipe,failover,i915simple,i965simple'
default_winsys = 'xlib'
+ default_dri = 'yes'
elif default_platform in ('winddk',):
default_statetrackers = 'none'
default_drivers = 'softpipe,i915simple'
default_winsys = 'none'
+ default_dri = 'no'
else:
default_drivers = 'all'
default_winsys = 'all'
+ default_dri = 'no'
+
# TODO: auto-detect defaults
opts = Options('config.py')
],
))
opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
-opts.Add(BoolOption('dri', 'build DRI drivers', 'no'))
+opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
env = Environment(
options = opts,
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\\ddk\\wxp')),
- escape('/I' + ntpath.join(WINDDK, 'inc\\ddk\\wdm\\wxp')),
- escape('/I' + ntpath.join(WINDDK, 'inc\\crt')),
- ])
- env.Append(CPPDEFINES = [
- ('i386', '1'),
- ])
- if debug:
- env.Append(CPPDEFINES = ['DBG'])
+ #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.Append(CFLAGS = '/W3')
+ if debug:
+ env.Append(CPPDEFINES = [
+ ('DBG', '1'),
+ ('DEBUG', '1'),
+ ('_DEBUG', '1'),
+ ])
+ env.Append(CFLAGS = '/Od /Zi')
+ env.Append(CXXFLAGS = '/Od /Zi')
+
# Optimization flags
if gcc:
# libGL
-if 1:
+if platform not in ('winddk',):
env.Append(LIBS = [
'X11',
'Xext',
SCons.Tool.mslink.generate(env)
+ # See also:
+ # - WINDDK's bin/makefile.new for more info.
+ # - http://alter.org.ua/docs/nt_kernel/vc8_proj/
+ env.Append(CPPDEFINES = [
+ 'WIN32',
+ '_WINDOWS',
+ ('i386', '1'),
+ ('_X86_', '1'),
+ 'STD_CALL',
+ ('CONDITION_HANDLING', '1'),
+ ('NT_INST', '0'),
+ ('_NT1X_', '100'),
+ ('WINNT', '1'),
+ ('_WIN32_WINNT', '0x0500'), # minimum required OS version
+ ('WIN32_LEAN_AND_MEAN', '1'),
+ ('DEVL', '1'),
+ ('FPO', '1'),
+ ])
+ cflags = [
+ '/GF', # Enable String Pooling
+ #'/EHsc', # Enable C++ Exceptions
+ '/Zp8', # 8bytes struct member alignment
+ #'/GS-', # No Buffer Security Check
+ #'/GR-', # Disable Run-Time Type Info
+ '/Gz', # __stdcall Calling convention
+ ]
+ env.Append(CFLAGS = cflags)
+ env.Append(CXXFLAGS = cflags)
+
+ env.Append(LINKFLAGS = [
+ '/DEBUG',
+ '/NODEFAULTLIB',
+ '/SUBSYSTEM:NATIVE',
+ '/INCREMENTAL:NO',
+ #'/DRIVER',
+
+ #'-subsystem:native,4.00',
+ '-base:0x10000',
+
+ '-entry:DrvEnableDriver',
+ ])
+
if not env.has_key('ENV'):
env['ENV'] = {}
if not env['ENV'].has_key('SystemRoot'): # required for dlls in the winsxs folders