~glmark2-dev/glmark2/fix-no-mapbuffer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
all_sources = bld.path.ant_glob('*.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')]

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'],
        defines      = ['USE_GL']
        )

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'],
        defines      = ['USE_GLESv2']
        )