
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
62 lines
969 B
Python
62 lines
969 B
Python
Import('*')
|
|
|
|
if env['platform'] not in ['windows', 'linux']:
|
|
Return()
|
|
|
|
env = env.Clone()
|
|
|
|
env.Append(CPPDEFINES = [
|
|
'GLEW_BUILD',
|
|
#'GLEW_STATIC',
|
|
#'GLEW_MX', # Multiple Rendering Contexts support
|
|
])
|
|
|
|
env.PrependUnique(CPPPATH = [
|
|
'#/include',
|
|
])
|
|
|
|
if env['platform'] == 'windows':
|
|
env.PrependUnique(LIBS = [
|
|
'glu32',
|
|
'opengl32',
|
|
'gdi32',
|
|
'user32',
|
|
])
|
|
else:
|
|
env.PrependUnique(LIBS = [
|
|
'GLU',
|
|
'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(
|
|
target = 'glewinfo',
|
|
source = ['glewinfo.c'],
|
|
)
|
|
|
|
env.Program(
|
|
target = 'visualinfo',
|
|
source = ['visualinfo.c'],
|
|
)
|
|
|
|
Export('glew')
|