summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-12-31 21:10:25 +0000
committerJosé Fonseca <jfonseca@vmware.com>2011-07-11 20:05:25 +0100
commit5d4c8eada5ca7340199fd379f3bad037c780c427 (patch)
treec22f9f3dcccbb1e7c57613086e8f44dcb3c29173
parent9a8d6cd5fcfaafadafb03f2f914d67abddcebfbd (diff)
downloadglut-5d4c8eada5ca7340199fd379f3bad037c780c427.tar.gz
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
-rw-r--r--src/glut/glx/SConscript66
1 files changed, 44 insertions, 22 deletions
diff --git a/src/glut/glx/SConscript b/src/glut/glx/SConscript
index 938fec0..5234e6d 100644
--- a/src/glut/glx/SConscript
+++ b/src/glut/glx/SConscript
@@ -2,11 +2,6 @@ Import('*')
env = env.Clone()
-if env['platform'] != 'windows':
- Return()
-
-target = 'glut32'
-
env.Replace(CPPDEFINES = [
'BUILD_GLUT32',
'GLUT_BUILDING_LIB',
@@ -18,14 +13,6 @@ env.AppendUnique(CPPPATH = [
'#/include',
])
-env.PrependUnique(LIBS = [
- 'winmm',
- 'gdi32',
- 'user32',
- 'opengl32',
- 'glu32',
-])
-
sources = [
'glut_bitmap.c',
'glut_bwidth.c',
@@ -61,12 +48,6 @@ sources = [
'glut_warp.c',
'glut_win.c',
'glut_winmisc.c',
-
- 'win32_glx.c',
- 'win32_menu.c',
- 'win32_util.c',
- 'win32_winproc.c',
- 'win32_x11.c',
'glut_8x13.c',
'glut_9x15.c',
@@ -77,11 +58,52 @@ sources = [
'glut_roman.c',
'glut_tr10.c',
'glut_tr24.c',
-
- 'glut.def',
]
-env.SharedLibrary(
+if env['platform'] == 'windows':
+ env.PrependUnique(LIBS = [
+ 'winmm',
+ 'gdi32',
+ 'user32',
+ 'opengl32',
+ 'glu32',
+ ])
+ target = 'glut32'
+ sources += [
+ 'win32_glx.c',
+ 'win32_menu.c',
+ 'win32_util.c',
+ 'win32_winproc.c',
+ 'win32_x11.c',
+ 'glut.def',
+ ]
+else:
+ env.PrependUnique(LIBS = [
+ 'GLU',
+ 'GL',
+ 'X11',
+ 'Xext',
+ 'Xmu',
+ 'Xi',
+ ])
+ target = 'glut'
+ sources += [
+ 'glut_fcb.c',
+ 'glut_menu.c',
+ 'glut_menu2.c',
+ 'glut_glxext.c',
+ 'layerutil.c',
+ ]
+
+
+glut = env.SharedLibrary(
target = target,
source = sources,
)
+
+env.InstallSharedLibrary(glut, version=(3, 7, 1))
+
+if env['platform'] == 'windows':
+ glut = env.FindIxes(glut, 'LIBPREFIX', 'LIBSUFFIX')
+
+Export('glut')