summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-24 16:43:07 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-24 16:43:07 +0900
commite70a431c3d87a829b3eb1b931d5af365ceee75b5 (patch)
treefa71a04f07cba37bc79d3679c8489daa6c3a3648 /SConstruct
parent7aadb475e58b91f3c17c2a70f6700225e9ef25ed (diff)
A few more tweaks to get correct WINDDK compilation.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct34
1 files changed, 22 insertions, 12 deletions
diff --git a/SConstruct b/SConstruct
index 02e6165005..219997ca91 100644
--- a/SConstruct
+++ b/SConstruct
@@ -39,13 +39,17 @@ if default_platform in ('linux', 'freebsd', 'darwin'):
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')
@@ -75,7 +79,7 @@ opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys,
],
))
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,
@@ -125,17 +129,23 @@ if platform == 'winddk':
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:
@@ -224,7 +234,7 @@ if llvm:
# libGL
-if 1:
+if platform not in ('winddk',):
env.Append(LIBS = [
'X11',
'Xext',