summaryrefslogtreecommitdiff
path: root/progs/SConstruct
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-11-21 03:40:48 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-11-21 10:44:30 +0900
commit72ebf4fd03fdf64b483026879e18a3158be0c6c8 (patch)
tree47ad20a58695bb4092981b5d1713aa4971291a17 /progs/SConstruct
parent85063fe9438cece2d338cd6e4deea5c081943aa4 (diff)
scons: Build progs.
Just demos and trivial dirs for starters.
Diffstat (limited to 'progs/SConstruct')
-rw-r--r--progs/SConstruct43
1 files changed, 43 insertions, 0 deletions
diff --git a/progs/SConstruct b/progs/SConstruct
new file mode 100644
index 0000000000..ac5314fac5
--- /dev/null
+++ b/progs/SConstruct
@@ -0,0 +1,43 @@
+import os
+import os.path
+import sys
+
+env = Environment(
+ tools = ['generic'],
+ toolpath = ['../scons'],
+ ENV = os.environ,
+)
+
+
+# Use Mesa's headers and libs
+if 0:
+ env.Append(CPPPATH = ['#../include'])
+ env.Append(LIBPATH = ['#../lib'])
+
+
+conf = Configure(env)
+
+# OpenGL
+if env['platform'] == 'windows':
+ env.Prepend(LIBS = ['glu32', 'opengl32'])
+else:
+ env.Prepend(LIBS = ['GLU', 'GL'])
+
+# Glut
+env['GLUT'] = False
+if conf.CheckCHeader('GL/glut.h'):
+ if env['platform'] == 'windows':
+ env['GLUT_LIB'] = 'glut32'
+ else:
+ env['GLUT_LIB'] = 'glut'
+ env['GLUT'] = True
+
+conf.Finish()
+
+
+Export('env')
+
+SConscript(
+ 'SConscript',
+ duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
+)