waf: ardupilotwaf: allow extra features for ap_program and ap_stlib

That allows tweak programs and static libraries builds for different
configurations.
This commit is contained in:
Gustavo Jose de Sousa 2016-03-02 18:08:39 -03:00 committed by Lucas De Marchi
parent 12946db4dc
commit 03c067921e

View File

@ -101,7 +101,7 @@ def ap_program(bld, program_group='bin',
if use_legacy_defines:
kw['defines'].extend(_get_legacy_defines(bld.path.name))
kw['features'] = kw.get('features', [])
kw['features'] = kw.get('features', []) + bld.env.AP_PROGRAM_FEATURES
if bld.env.STATIC_LINKING:
kw['features'].append('static_linking')
@ -150,6 +150,7 @@ def ap_stlib(bld, **kw):
lib_sources = lib_node.ant_glob(SOURCE_EXTS + UTILITY_SOURCE_EXTS)
sources.extend(lib_sources)
kw['features'] = kw.get('features', []) + bld.env.AP_STLIB_FEATURES
kw['source'] = sources
kw['target'] = kw['name']
kw['defines'] = _get_legacy_defines(kw['vehicle'])