summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-23 00:46:40 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-23 00:47:28 +0900
commit26c57d163092d8069c69ff47929e73682b819ab2 (patch)
tree50de8e4648611ae0ed31b6f67362529ea33e5cc1
parent16245d9b38c8cfd5c9ad1636bc0cfcce308a740b (diff)
Avoid building problematic module/drivers on windows.
-rw-r--r--SConstruct30
-rw-r--r--src/SConscript11
-rw-r--r--src/gallium/SConscript9
-rw-r--r--src/gallium/winsys/SConscript3
4 files changed, 40 insertions, 13 deletions
diff --git a/SConstruct b/SConstruct
index 0420195395..f4438cf546 100644
--- a/SConstruct
+++ b/SConstruct
@@ -33,17 +33,37 @@ platform_map = {
'win32': 'winddk',
}
-platform = platform_map.get(sys.platform, sys.platform)
+default_platform = platform_map.get(sys.platform, sys.platform)
+default_drivers = 'all'
+if default_platform in ('linux', 'freebsd', 'darwin'):
+ default_x11 = 'yes'
+else:
+ default_x11 = 'no'
# TODO: auto-detect defaults
opts = Options('config.py')
opts.Add(BoolOption('debug', 'build debug version', False))
-opts.Add(BoolOption('dri', 'build dri drivers', False))
-opts.Add(BoolOption('llvm', 'use llvm', False))
opts.Add(EnumOption('machine', 'use machine-specific assembly code', 'x86',
allowed_values=('generic', 'x86', 'x86-64')))
-opts.Add(EnumOption('platform', 'target platform', platform,
+opts.Add(EnumOption('platform', 'target platform', default_platform,
allowed_values=('linux', 'cell', 'winddk')))
+opts.Add(ListOption('statetrackers', 'state_trackers to build', 'all',
+ [
+ 'mesa',
+ ],
+ ))
+#opts.Add(ListOption('drivers', 'pipe drivers to build', 'all',
+# [
+# 'softpipe',
+# 'failover',
+# 'i915simple',
+# 'i965simple',
+# 'cell',
+# ],
+# ))
+opts.Add(BoolOption('llvm', 'use llvm', False))
+opts.Add(BoolOption('dri', 'build dri drivers', False))
+opts.Add(BoolOption('x11', 'build x11 driver', default_x11))
env = Environment(
options = opts,
@@ -114,7 +134,7 @@ if gcc:
env.Append(CFLAGS = '-O3 -g3')
env.Append(CXXFLAGS = '-O3 -g3')
- env.Append(CFLAGS = '-Wall -Wmissing-prototypes -std=c99 -ffast-math -pedantic')
+ env.Append(CFLAGS = '-Wall -Wmissing-prototypes -Wno-long-long -ffast-math -pedantic')
env.Append(CXXFLAGS = '-Wall -pedantic')
# Be nice to Eclipse
diff --git a/src/SConscript b/src/SConscript
index 5b09943894..e2ee50dd6e 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1,7 +1,8 @@
Import('*')
-SConscript([
- 'gallium/SConscript',
- 'mesa/SConscript',
- 'gallium/winsys/SConscript',
-])
+SConscript('gallium/SConscript')
+
+if 'mesa' in env['state_trackers']:
+ SConscript('mesa/SConscript')
+
+SConscript('gallium/winsys/SConscript')
diff --git a/src/gallium/SConscript b/src/gallium/SConscript
index a08b4b830e..210fd7d309 100644
--- a/src/gallium/SConscript
+++ b/src/gallium/SConscript
@@ -23,7 +23,12 @@ if llvm:
SConscript([
'drivers/softpipe/SConscript',
'drivers/i915simple/SConscript',
- 'drivers/i965simple/SConscript',
'drivers/failover/SConscript',
- #'drivers/cell/SConscript',
])
+
+if not msvc:
+ SConscript(['drivers/i965simple/SConscript'])
+
+#if cell:
+# SConscript(['drivers/cell/SConscript'])
+ \ No newline at end of file
diff --git a/src/gallium/winsys/SConscript b/src/gallium/winsys/SConscript
index 32215d8d58..3f0596e19c 100644
--- a/src/gallium/winsys/SConscript
+++ b/src/gallium/winsys/SConscript
@@ -4,7 +4,8 @@ if dri:
SConscript([
'dri/SConscript',
])
-else:
+
+if env['x11'] and not dri and platform != 'winddk':
SConscript([
'xlib/SConscript',
])