summaryrefslogtreecommitdiff
path: root/progs/SConscript
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-12-31 21:10:25 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-01-01 12:16:19 +0000
commit7bbf7f94ea786e41ff1364cedaf7dd5c0bbf605a (patch)
treef1869014d019a56360916119528e8a2cad7ef1bd /progs/SConscript
parent58b401315b1db3c2c483e1d1df372be76ca1001a (diff)
scons: Build progs together with everything else.
This is a substantial reorganization, This particular commit enables: - building the progs for unices platforms - glew is now built as a shared library (it is the default, and it is inconvenient and pointless to shift away from that default) - all progs get built by default
Diffstat (limited to 'progs/SConscript')
-rw-r--r--progs/SConscript38
1 files changed, 38 insertions, 0 deletions
diff --git a/progs/SConscript b/progs/SConscript
index 66eaf9e541..3b180d00bc 100644
--- a/progs/SConscript
+++ b/progs/SConscript
@@ -1,5 +1,43 @@
SConscript([
'util/SConscript',
+])
+
+Import('*')
+
+progs_env = env.Clone()
+
+if progs_env['platform'] == 'windows':
+ progs_env.Append(CPPDEFINES = ['NOMINMAX'])
+ progs_env.Prepend(LIBS = [
+ 'winmm',
+ 'kernel32',
+ 'user32',
+ 'gdi32',
+ ])
+
+# OpenGL
+if progs_env['platform'] == 'windows':
+ progs_env.Prepend(LIBS = ['glu32', 'opengl32'])
+else:
+ progs_env.Prepend(LIBS = ['GLU', 'GL'])
+
+# Glut
+progs_env.Prepend(LIBS = [glut])
+
+# GLEW
+progs_env.Prepend(LIBS = [glew])
+
+progs_env.Prepend(CPPPATH = [
+ '#progs/util',
+])
+
+progs_env.Prepend(LIBS = [
+ util,
+])
+
+Export('progs_env')
+
+SConscript([
'demos/SConscript',
'glsl/SConscript',
'redbook/SConscript',