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
This commit is contained in:
@@ -177,7 +177,7 @@ if env['platform'] != common.default_platform:
|
|||||||
|
|
||||||
SConscript(
|
SConscript(
|
||||||
'src/glsl/SConscript',
|
'src/glsl/SConscript',
|
||||||
variant_dir = env['build'] + '/host',
|
variant_dir = os.path.join(env['build'], 'host'),
|
||||||
duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||||
exports={'env':host_env},
|
exports={'env':host_env},
|
||||||
)
|
)
|
||||||
@@ -187,3 +187,9 @@ SConscript(
|
|||||||
variant_dir = env['build'],
|
variant_dir = env['build'],
|
||||||
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||||
)
|
)
|
||||||
|
|
||||||
|
SConscript(
|
||||||
|
'progs/SConscript',
|
||||||
|
variant_dir = os.path.join('progs', env['build']),
|
||||||
|
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||||
|
)
|
||||||
|
@@ -351,20 +351,11 @@ example linux or windows, <i>machine</i> is x86 or x86_64, optionally followed
|
|||||||
by -debug for debug builds.
|
by -debug for debug builds.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
|
||||||
The sample programs are built seperately. To build them do
|
|
||||||
<pre>
|
|
||||||
scons -C progs
|
|
||||||
</pre>
|
|
||||||
And the build output will be placed in progs/build/...
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do
|
To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
scons platform=windows toolchain=crossmingw machine=x86 statetrackers=mesa drivers=softpipe,trace winsys=gdi
|
scons platform=windows toolchain=crossmingw machine=x86 statetrackers=mesa drivers=softpipe,trace winsys=gdi
|
||||||
scons -C progs platform=windows toolchain=crossmingw machine=x86 -k
|
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
This will create:
|
This will create:
|
||||||
|
@@ -1,5 +1,43 @@
|
|||||||
SConscript([
|
SConscript([
|
||||||
'util/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',
|
'demos/SConscript',
|
||||||
'glsl/SConscript',
|
'glsl/SConscript',
|
||||||
'redbook/SConscript',
|
'redbook/SConscript',
|
||||||
|
@@ -1,65 +0,0 @@
|
|||||||
import os
|
|
||||||
import os.path
|
|
||||||
import sys
|
|
||||||
|
|
||||||
env = Environment(
|
|
||||||
tools = ['generic'],
|
|
||||||
toolpath = ['../scons'],
|
|
||||||
ENV = os.environ,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Use Mesa's headers and libs
|
|
||||||
if 1:
|
|
||||||
build_topdir = 'build'
|
|
||||||
build_subdir = env['platform']
|
|
||||||
if env['machine'] != 'generic':
|
|
||||||
build_subdir += '-' + env['machine']
|
|
||||||
if env['debug']:
|
|
||||||
build_subdir += "-debug"
|
|
||||||
if env['profile']:
|
|
||||||
build_subdir += "-profile"
|
|
||||||
build_dir = os.path.join(build_topdir, build_subdir)
|
|
||||||
|
|
||||||
env.Append(CPPDEFINES = ['GLEW_STATIC'])
|
|
||||||
env.Append(CPPPATH = ['#../include'])
|
|
||||||
env.Append(LIBPATH = [
|
|
||||||
'#../' + build_dir + '/glew/',
|
|
||||||
'#../' + build_dir + '/glut/glx',
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# GLEW
|
|
||||||
env['GLEW'] = False
|
|
||||||
if conf.CheckCHeader('GL/glew.h'):
|
|
||||||
env['GLEW_LIB'] = 'glew'
|
|
||||||
env['GLEW'] = True
|
|
||||||
env.Prepend(LIBS = ['glew'])
|
|
||||||
|
|
||||||
conf.Finish()
|
|
||||||
|
|
||||||
|
|
||||||
Export('env')
|
|
||||||
|
|
||||||
SConscript(
|
|
||||||
'SConscript',
|
|
||||||
build_dir = env['build'],
|
|
||||||
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
|
||||||
)
|
|
@@ -1,84 +1,66 @@
|
|||||||
Import('*')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(CPPPATH = [
|
|
||||||
'../util',
|
|
||||||
])
|
|
||||||
|
|
||||||
env.Prepend(LIBS = [
|
|
||||||
util,
|
|
||||||
'$GLUT_LIB'
|
|
||||||
])
|
|
||||||
|
|
||||||
if env['platform'] == 'windows':
|
|
||||||
env.Append(CPPDEFINES = ['NOMINMAX'])
|
|
||||||
env.Prepend(LIBS = ['winmm'])
|
|
||||||
|
|
||||||
progs = [
|
progs = [
|
||||||
'arbfplight',
|
'arbfplight',
|
||||||
'arbfslight',
|
'arbfslight',
|
||||||
'arbocclude',
|
'arbocclude',
|
||||||
'bounce',
|
'bounce',
|
||||||
'clearspd',
|
'clearspd',
|
||||||
'copypix',
|
'copypix',
|
||||||
'cubemap',
|
'cubemap',
|
||||||
'drawpix',
|
'drawpix',
|
||||||
'engine',
|
'engine',
|
||||||
'fbo_firecube',
|
'fbo_firecube',
|
||||||
'fire',
|
'fire',
|
||||||
'fogcoord',
|
'fogcoord',
|
||||||
'fplight',
|
'fplight',
|
||||||
'fslight',
|
'fslight',
|
||||||
'gamma',
|
'gamma',
|
||||||
'gearbox',
|
'gearbox',
|
||||||
'gears',
|
'gears',
|
||||||
'geartrain',
|
'geartrain',
|
||||||
'glinfo',
|
'glinfo',
|
||||||
'gloss',
|
'gloss',
|
||||||
'gltestperf',
|
'gltestperf',
|
||||||
'ipers',
|
'ipers',
|
||||||
'isosurf',
|
'isosurf',
|
||||||
'lodbias',
|
'lodbias',
|
||||||
'morph3d',
|
'morph3d',
|
||||||
'multiarb',
|
'multiarb',
|
||||||
'paltex',
|
'paltex',
|
||||||
'pointblast',
|
'pointblast',
|
||||||
'ray',
|
'ray',
|
||||||
'readpix',
|
'readpix',
|
||||||
'reflect',
|
'reflect',
|
||||||
'renormal',
|
'renormal',
|
||||||
'shadowtex',
|
'shadowtex',
|
||||||
'singlebuffer',
|
'singlebuffer',
|
||||||
'spectex',
|
'spectex',
|
||||||
'spriteblast',
|
'spriteblast',
|
||||||
'stex3d',
|
'stex3d',
|
||||||
'teapot',
|
'teapot',
|
||||||
'terrain',
|
'terrain',
|
||||||
'tessdemo',
|
'tessdemo',
|
||||||
'texcyl',
|
'texcyl',
|
||||||
'texenv',
|
'texenv',
|
||||||
'textures',
|
'textures',
|
||||||
'trispd',
|
'trispd',
|
||||||
'tunnel',
|
'tunnel',
|
||||||
'tunnel2',
|
'tunnel2',
|
||||||
'vao_demo',
|
'vao_demo',
|
||||||
'winpos',
|
'winpos',
|
||||||
'dinoshade',
|
'dinoshade',
|
||||||
'fbotexture',
|
'fbotexture',
|
||||||
'projtex',
|
'projtex',
|
||||||
]
|
]
|
||||||
|
|
||||||
for prog in progs:
|
for prog in progs:
|
||||||
env.Program(
|
progs_env.Program(
|
||||||
target = prog,
|
target = prog,
|
||||||
source = prog + '.c',
|
source = prog + '.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
env.Program(
|
progs_env.Program(
|
||||||
target = 'rain',
|
target = 'rain',
|
||||||
source = [
|
source = [
|
||||||
'rain.cxx',
|
'rain.cxx',
|
||||||
|
@@ -1,15 +1,4 @@
|
|||||||
Import('env')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(CPPPATH = [
|
|
||||||
'../util',
|
|
||||||
])
|
|
||||||
|
|
||||||
env.Prepend(LIBS = ['$GLUT_LIB'])
|
|
||||||
|
|
||||||
progs = [
|
progs = [
|
||||||
'fp-tri',
|
'fp-tri',
|
||||||
@@ -24,7 +13,7 @@ progs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
for prog in progs:
|
for prog in progs:
|
||||||
env.Program(
|
progs_env.Program(
|
||||||
target = prog,
|
target = prog,
|
||||||
source = [prog + '.c'],
|
source = [prog + '.c'],
|
||||||
)
|
)
|
||||||
|
@@ -1,23 +1,5 @@
|
|||||||
Import('*')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(CPPPATH = [
|
|
||||||
'../util',
|
|
||||||
])
|
|
||||||
|
|
||||||
env.Prepend(LIBS = [
|
|
||||||
util,
|
|
||||||
'$GLUT_LIB'
|
|
||||||
])
|
|
||||||
|
|
||||||
if env['platform'] == 'windows':
|
|
||||||
env.Append(CPPDEFINES = ['NOMINMAX'])
|
|
||||||
env.Prepend(LIBS = ['winmm'])
|
|
||||||
|
|
||||||
progs = [
|
progs = [
|
||||||
'array',
|
'array',
|
||||||
'bitmap',
|
'bitmap',
|
||||||
@@ -48,7 +30,7 @@ progs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
for prog in progs:
|
for prog in progs:
|
||||||
env.Program(
|
progs_env.Program(
|
||||||
target = prog,
|
target = prog,
|
||||||
source = prog + '.c',
|
source = prog + '.c',
|
||||||
)
|
)
|
||||||
|
@@ -1,11 +1,4 @@
|
|||||||
Import('env')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(LIBS = ['$GLUT_LIB'])
|
|
||||||
|
|
||||||
progs = [
|
progs = [
|
||||||
'copytex',
|
'copytex',
|
||||||
@@ -21,7 +14,7 @@ progs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
for prog in progs:
|
for prog in progs:
|
||||||
env.Program(
|
progs_env.Program(
|
||||||
target = prog,
|
target = prog,
|
||||||
source = [
|
source = [
|
||||||
prog + '.c',
|
prog + '.c',
|
||||||
|
@@ -1,23 +1,5 @@
|
|||||||
Import('*')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(CPPPATH = [
|
|
||||||
'../util',
|
|
||||||
])
|
|
||||||
|
|
||||||
env.Prepend(LIBS = [
|
|
||||||
util,
|
|
||||||
'$GLUT_LIB'
|
|
||||||
])
|
|
||||||
|
|
||||||
if env['platform'] == 'windows':
|
|
||||||
env.Append(CPPDEFINES = ['NOMINMAX'])
|
|
||||||
env.Prepend(LIBS = ['winmm'])
|
|
||||||
|
|
||||||
progs = [
|
progs = [
|
||||||
'aaindex',
|
'aaindex',
|
||||||
'aapoly',
|
'aapoly',
|
||||||
@@ -85,7 +67,7 @@ progs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
for prog in progs:
|
for prog in progs:
|
||||||
env.Program(
|
progs_env.Program(
|
||||||
target = prog,
|
target = prog,
|
||||||
source = prog + '.c',
|
source = prog + '.c',
|
||||||
)
|
)
|
||||||
|
@@ -1,23 +1,5 @@
|
|||||||
Import('*')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(CPPPATH = [
|
|
||||||
'../util',
|
|
||||||
])
|
|
||||||
|
|
||||||
env.Prepend(LIBS = [
|
|
||||||
util,
|
|
||||||
'$GLUT_LIB'
|
|
||||||
])
|
|
||||||
|
|
||||||
if env['platform'] == 'windows':
|
|
||||||
env.Append(CPPDEFINES = ['NOMINMAX'])
|
|
||||||
env.Prepend(LIBS = ['winmm'])
|
|
||||||
|
|
||||||
progs = [
|
progs = [
|
||||||
'accum',
|
'accum',
|
||||||
'bitmap1',
|
'bitmap1',
|
||||||
@@ -52,7 +34,7 @@ progs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
for prog in progs:
|
for prog in progs:
|
||||||
env.Program(
|
progs_env.Program(
|
||||||
target = prog,
|
target = prog,
|
||||||
source = prog + '.c',
|
source = prog + '.c',
|
||||||
)
|
)
|
||||||
|
@@ -1,23 +1,5 @@
|
|||||||
Import('*')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(CPPPATH = [
|
|
||||||
'../util',
|
|
||||||
])
|
|
||||||
|
|
||||||
env.Prepend(LIBS = [
|
|
||||||
util,
|
|
||||||
'$GLUT_LIB'
|
|
||||||
])
|
|
||||||
|
|
||||||
if env['platform'] == 'windows':
|
|
||||||
env.Append(CPPDEFINES = ['NOMINMAX'])
|
|
||||||
env.Prepend(LIBS = ['winmm'])
|
|
||||||
|
|
||||||
linux_progs = [
|
linux_progs = [
|
||||||
'api_speed',
|
'api_speed',
|
||||||
]
|
]
|
||||||
@@ -140,7 +122,7 @@ progs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
for prog in progs:
|
for prog in progs:
|
||||||
env.Program(
|
progs_env.Program(
|
||||||
target = prog,
|
target = prog,
|
||||||
source = prog + '.c',
|
source = prog + '.c',
|
||||||
)
|
)
|
||||||
|
@@ -1,11 +1,4 @@
|
|||||||
Import('env')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(LIBS = ['$GLUT_LIB'])
|
|
||||||
|
|
||||||
progs = [
|
progs = [
|
||||||
'clear-fbo-tex',
|
'clear-fbo-tex',
|
||||||
@@ -154,7 +147,7 @@ progs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
for prog in progs:
|
for prog in progs:
|
||||||
prog = env.Program(
|
prog = progs_env.Program(
|
||||||
target = prog,
|
target = prog,
|
||||||
source = prog + '.c',
|
source = prog + '.c',
|
||||||
)
|
)
|
||||||
|
@@ -1,13 +1,6 @@
|
|||||||
Import('env')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
progs_env.Program(
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(LIBS = ['$GLUT_LIB'])
|
|
||||||
|
|
||||||
env.Program(
|
|
||||||
target = 'vp-tris',
|
target = 'vp-tris',
|
||||||
source = ['vp-tris.c'],
|
source = ['vp-tris.c'],
|
||||||
)
|
)
|
||||||
|
@@ -1,13 +1,6 @@
|
|||||||
Import('env')
|
Import('*')
|
||||||
|
|
||||||
if not env['GLUT']:
|
progs_env.Program(
|
||||||
Return()
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Prepend(LIBS = ['$GLUT_LIB'])
|
|
||||||
|
|
||||||
env.Program(
|
|
||||||
target = 'vp-tris',
|
target = 'vp-tris',
|
||||||
source = ['vp-tris.c'],
|
source = ['vp-tris.c'],
|
||||||
)
|
)
|
||||||
|
@@ -1,25 +1,17 @@
|
|||||||
Import('*')
|
Import('*')
|
||||||
|
|
||||||
if env['platform'] != 'windows':
|
if progs_env['platform'] != 'windows':
|
||||||
Return()
|
Return()
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
env.Append(LIBS = [
|
|
||||||
'kernel32',
|
|
||||||
'user32',
|
|
||||||
'gdi32',
|
|
||||||
])
|
|
||||||
|
|
||||||
progs = [
|
progs = [
|
||||||
'sharedtex_mt',
|
'sharedtex_mt',
|
||||||
'wglthreads',
|
'wglthreads',
|
||||||
]
|
]
|
||||||
|
|
||||||
for prog in progs:
|
for prog in progs:
|
||||||
env.Program(
|
progs_env.Program(
|
||||||
target = prog,
|
target = prog,
|
||||||
source = prog + '/' + prog + '.c',
|
source = prog + '/' + prog + '.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
env.Program('wglinfo', ['wglinfo.c'])
|
progs_env.Program('wglinfo', ['wglinfo.c'])
|
||||||
|
@@ -7,7 +7,7 @@ env = env.Clone()
|
|||||||
|
|
||||||
env.Append(CPPDEFINES = [
|
env.Append(CPPDEFINES = [
|
||||||
'GLEW_BUILD',
|
'GLEW_BUILD',
|
||||||
'GLEW_STATIC',
|
#'GLEW_STATIC',
|
||||||
#'GLEW_MX', # Multiple Rendering Contexts support
|
#'GLEW_MX', # Multiple Rendering Contexts support
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -15,15 +15,6 @@ env.PrependUnique(CPPPATH = [
|
|||||||
'#/include',
|
'#/include',
|
||||||
])
|
])
|
||||||
|
|
||||||
glew = env.StaticLibrary(
|
|
||||||
target = 'glew',
|
|
||||||
source = [
|
|
||||||
'glew.c',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
env = env.Clone()
|
|
||||||
|
|
||||||
if env['platform'] == 'windows':
|
if env['platform'] == 'windows':
|
||||||
env.PrependUnique(LIBS = [
|
env.PrependUnique(LIBS = [
|
||||||
'glu32',
|
'glu32',
|
||||||
@@ -37,6 +28,24 @@ else:
|
|||||||
'GL',
|
'GL',
|
||||||
'X11',
|
'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.Prepend(LIBS = [glew])
|
||||||
|
|
||||||
env.Program(
|
env.Program(
|
||||||
@@ -48,3 +57,5 @@ env.Program(
|
|||||||
target = 'visualinfo',
|
target = 'visualinfo',
|
||||||
source = ['visualinfo.c'],
|
source = ['visualinfo.c'],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Export('glew')
|
||||||
|
@@ -2,11 +2,6 @@ Import('*')
|
|||||||
|
|
||||||
env = env.Clone()
|
env = env.Clone()
|
||||||
|
|
||||||
if env['platform'] != 'windows':
|
|
||||||
Return()
|
|
||||||
|
|
||||||
target = 'glut32'
|
|
||||||
|
|
||||||
env.Replace(CPPDEFINES = [
|
env.Replace(CPPDEFINES = [
|
||||||
'BUILD_GLUT32',
|
'BUILD_GLUT32',
|
||||||
'GLUT_BUILDING_LIB',
|
'GLUT_BUILDING_LIB',
|
||||||
@@ -18,14 +13,6 @@ env.AppendUnique(CPPPATH = [
|
|||||||
'#/include',
|
'#/include',
|
||||||
])
|
])
|
||||||
|
|
||||||
env.PrependUnique(LIBS = [
|
|
||||||
'winmm',
|
|
||||||
'gdi32',
|
|
||||||
'user32',
|
|
||||||
'opengl32',
|
|
||||||
'glu32',
|
|
||||||
])
|
|
||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
'glut_bitmap.c',
|
'glut_bitmap.c',
|
||||||
'glut_bwidth.c',
|
'glut_bwidth.c',
|
||||||
@@ -62,12 +49,6 @@ sources = [
|
|||||||
'glut_win.c',
|
'glut_win.c',
|
||||||
'glut_winmisc.c',
|
'glut_winmisc.c',
|
||||||
|
|
||||||
'win32_glx.c',
|
|
||||||
'win32_menu.c',
|
|
||||||
'win32_util.c',
|
|
||||||
'win32_winproc.c',
|
|
||||||
'win32_x11.c',
|
|
||||||
|
|
||||||
'glut_8x13.c',
|
'glut_8x13.c',
|
||||||
'glut_9x15.c',
|
'glut_9x15.c',
|
||||||
'glut_hel10.c',
|
'glut_hel10.c',
|
||||||
@@ -77,11 +58,52 @@ sources = [
|
|||||||
'glut_roman.c',
|
'glut_roman.c',
|
||||||
'glut_tr10.c',
|
'glut_tr10.c',
|
||||||
'glut_tr24.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,
|
target = target,
|
||||||
source = sources,
|
source = sources,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
env.InstallSharedLibrary(glut, version=(3, 7, 1))
|
||||||
|
|
||||||
|
if env['platform'] == 'windows':
|
||||||
|
glut = env.FindIxes(glut, 'LIBPREFIX', 'LIBSUFFIX')
|
||||||
|
|
||||||
|
Export('glut')
|
||||||
|
Reference in New Issue
Block a user