blob: d1d11c4afb31d82a3c04a5d00a9771eac5e55a0a [file] [log] [blame]
all_sources = bld.path.ant_glob('*.cpp scene-ideas/*.cc scene-terrain/*.cpp')
common_sources = [f for f in all_sources if f.name.find('canvas-') == -1 and
f.name.find('android') == -1 ]
gl_sources = ['canvas-x11.cpp', 'canvas-x11-glx.cpp']
glesv2_sources = ['canvas-x11.cpp', 'canvas-x11-egl.cpp']
libmatrix_sources = [f for f in bld.path.ant_glob('libmatrix/*.cc')
if not f.name.endswith('test.cc')]
includes = ['.', 'scene-ideas', 'scene-terrain']
if bld.env.USE_GL:
bld(
features = ['cxx', 'cxxstlib'],
source = libmatrix_sources,
target = 'matrix',
lib = ['m'],
includes = ['.'],
export_includes = 'libmatrix',
defines = ['USE_GL', 'USE_EXCEPTIONS']
)
bld(
features = ['cxx', 'cprogram'],
source = common_sources + gl_sources,
target = 'glmark2',
use = ['x11', 'gl', 'matrix', 'libpng12'],
lib = ['m', 'jpeg'],
includes = includes,
defines = ['USE_GL', 'USE_EXCEPTIONS']
)
if bld.env.USE_GLESv2:
bld(
features = ['cxx', 'cxxstlib'],
source = libmatrix_sources,
target = 'matrix-es2',
lib = ['m'],
includes = ['.'],
export_includes = 'libmatrix',
defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
)
bld(
features = ['cxx', 'cprogram'],
source = common_sources + glesv2_sources,
target = 'glmark2-es2',
use = ['x11', 'egl', 'glesv2', 'matrix-es2', 'libpng12'],
lib = ['m', 'dl', 'jpeg'],
includes = includes,
defines = ['USE_GLESv2', 'USE_EXCEPTIONS']
)