blob: b742b48e9ec90e3a478fc4c0554412738a33e4d3 [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 and
f.name.find('egl-') == -1]
gl_sources = ['canvas-x11.cpp', 'canvas-x11-glx.cpp']
glesv2_sources = ['canvas-x11.cpp', 'canvas-x11-egl.cpp', 'egl-state.cpp']
gl_drm_sources = ['canvas-drm.cpp', 'egl-state.cpp']
glesv2_drm_sources = ['canvas-drm.cpp', 'egl-state.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']
)
if bld.env.USE_GL_DRM:
bld(
features = ['cxx', 'cxxstlib'],
source = libmatrix_sources,
target = 'matrix-drm',
lib = ['m'],
includes = ['.'],
export_includes = 'libmatrix',
defines = ['USE_DRM', '__GBM__', 'USE_GL', 'USE_EXCEPTIONS']
)
bld(
features = ['cxx', 'cprogram'],
source = common_sources + gl_drm_sources,
target = 'glmark2-drm',
use = ['egl', 'gl', 'matrix-drm', 'libpng12', 'drm', 'gbm'],
lib = ['m', 'jpeg', 'dl'],
includes = includes,
defines = ['USE_DRM', '__GBM__', 'USE_GL']
)
if bld.env.USE_GLESv2_DRM:
bld(
features = ['cxx', 'cxxstlib'],
source = libmatrix_sources,
target = 'matrix-es2-drm',
lib = ['m'],
includes = ['.'],
export_includes = 'libmatrix',
defines = ['USE_DRM', '__GBM__', 'USE_GLESv2', 'USE_EXCEPTIONS']
)
bld(
features = ['cxx', 'cprogram'],
source = common_sources + glesv2_drm_sources,
target = 'glmark2-es2-drm',
use = ['egl', 'glesv2', 'matrix-es2-drm', 'libpng12', 'drm',
'gbm'],
lib = ['m', 'jpeg', 'dl'],
includes = includes,
defines = ['USE_DRM', '__GBM__', 'USE_GLESv2']
)