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
diff --git a/progs/SConscript b/progs/SConscript
index 66eaf9e..3b180d0 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',