summaryrefslogtreecommitdiff
path: root/src/glew
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 /src/glew
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 'src/glew')
-rw-r--r--src/glew/SConscript31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/glew/SConscript b/src/glew/SConscript
index 1161be6e63..b4541a7c26 100644
--- a/src/glew/SConscript
+++ b/src/glew/SConscript
@@ -7,7 +7,7 @@ env = env.Clone()
env.Append(CPPDEFINES = [
'GLEW_BUILD',
- 'GLEW_STATIC',
+ #'GLEW_STATIC',
#'GLEW_MX', # Multiple Rendering Contexts support
])
@@ -15,15 +15,6 @@ env.PrependUnique(CPPPATH = [
'#/include',
])
-glew = env.StaticLibrary(
- target = 'glew',
- source = [
- 'glew.c',
- ],
-)
-
-env = env.Clone()
-
if env['platform'] == 'windows':
env.PrependUnique(LIBS = [
'glu32',
@@ -37,6 +28,24 @@ else:
'GL',
'X11',
])
+
+if env['platform'] == 'windows':
+ target = 'glew'
+else:
+ target = 'GLEW'
+
+glew = env.SharedLibrary(
+ target = target,
+ source = [
+ 'glew.c',
+ ],
+)
+
+if env['platform'] == 'windows':
+ glew = env.FindIxes(glew, 'LIBPREFIX', 'LIBSUFFIX')
+
+env = env.Clone()
+
env.Prepend(LIBS = [glew])
env.Program(
@@ -48,3 +57,5 @@ env.Program(
target = 'visualinfo',
source = ['visualinfo.c'],
)
+
+Export('glew')