=== modified file 'doc/wscript_build'
@@ -1,21 +1,12 @@
-if bld.env.USE_GL:
- bld(
- features = 'subst',
- source = 'glmark2.1.in',
- target = bld.path.find_or_declare('glmark2.1'),
- APPNAME = 'GLMARK2',
- appname = 'glmark2',
- appversion = bld.env.GLMARK2_VERSION,
- install_path = '${MANDIR}/man1'
- )
-
-if bld.env.USE_GLESv2:
- bld(
- features = 'subst',
- source = 'glmark2.1.in',
- target = bld.path.find_or_declare('glmark2-es2.1'),
- APPNAME = 'GLMARK2-ES2',
- appname = 'glmark2-es2',
- appversion = bld.env.GLMARK2_VERSION,
- install_path = '${MANDIR}/man1'
- )
+for name in bld.env.keys():
+ if name.startswith('FLAVOR_') and bld.env[name]:
+ target = bld.env[name]
+ bld(
+ features = 'subst',
+ source = 'glmark2.1.in',
+ target = bld.path.find_or_declare('%s.1' % target),
+ APPNAME = 'GLMARK2',
+ appname = target,
+ appversion = bld.env.GLMARK2_VERSION,
+ install_path = '${MANDIR}/man1'
+ )
=== modified file 'src/wscript_build'
@@ -14,12 +14,6 @@
'drm-gl' : ['canvas-generic.cpp', 'native-state-drm.cpp', 'gl-state-egl.cpp'],
'drm-glesv2' : ['canvas-generic.cpp', 'native-state-drm.cpp', 'gl-state-egl.cpp']
}
-flavor_target = {
- 'x11-gl' : 'glmark2',
- 'x11-glesv2' : 'glmark2-es2',
- 'drm-gl' : 'glmark2-drm',
- 'drm-glesv2' : 'glmark2-es2-drm'
-}
flavor_uselibs = {
'x11-gl' : ['x11', 'gl', 'matrix-gl'],
'x11-glesv2' : ['x11', 'egl', 'glesv2', 'matrix-glesv2'],
@@ -40,10 +34,11 @@
for name in bld.env.keys():
if name.startswith('FLAVOR_') and bld.env[name]:
flavor = name.replace('FLAVOR_', '').lower().replace('_', '-')
+ target = bld.env[name]
bld(
features = ['cxx', 'cprogram'],
source = common_sources + flavor_sources[flavor],
- target = flavor_target[flavor],
+ target = target,
use = common_uselibs + flavor_uselibs[flavor],
lib = ['m', 'jpeg', 'dl'],
includes = includes,
=== modified file 'wscript'
@@ -11,8 +11,13 @@
VERSION = '2012.12'
APPNAME = 'glmark2'
-FLAVORS = ['x11-gl', 'x11-glesv2', 'drm-gl', 'drm-glesv2']
-FLAVORS_STR = ", ".join(FLAVORS)
+FLAVORS = {
+ 'x11-gl' : 'glmark2',
+ 'x11-glesv2' : 'glmark2-es2',
+ 'drm-gl' : 'glmark2-drm',
+ 'drm-glesv2' : 'glmark2-es2-drm'
+}
+FLAVORS_STR = ", ".join(FLAVORS.keys())
def option_list_cb(option, opt, value, parser):
value = value.split(',')
@@ -49,7 +54,7 @@
def configure(ctx):
# Special 'all' flavor
if 'all' in Options.options.flavors:
- Options.options.flavors = list(set(Options.options.flavors) | set(FLAVORS))
+ Options.options.flavors = list(set(Options.options.flavors) | set(FLAVORS.keys()))
Options.options.flavors.remove('all')
# Ensure the flavors are valid
@@ -61,7 +66,8 @@
ctx.fatal('You need to select at least one flavor. Supported flavors are %s' % FLAVORS_STR)
for flavor in FLAVORS:
- ctx.env["FLAVOR_%s" % flavor.upper().replace('-','_')] = flavor in Options.options.flavors
+ if flavor in Options.options.flavors:
+ ctx.env["FLAVOR_%s" % flavor.upper().replace('-','_')] = FLAVORS[flavor]
ctx.check_tool('gnu_dirs')
ctx.check_tool('compiler_cc')