mirror of https://github.com/ArduPilot/ardupilot
waf: add "ap_" prefix to keywords "libraries" and "vehicle"
As an effort to keep things specific to ardupilot API in the build system consistent and easy way to identify.
This commit is contained in:
parent
282817eeb9
commit
f2dec971e7
|
@ -5,8 +5,8 @@ def build(bld):
|
||||||
vehicle = bld.path.name
|
vehicle = bld.path.name
|
||||||
bld.ap_stlib(
|
bld.ap_stlib(
|
||||||
name=vehicle + '_libs',
|
name=vehicle + '_libs',
|
||||||
vehicle=vehicle,
|
ap_vehicle=vehicle,
|
||||||
libraries=bld.ap_common_vehicle_libraries() + [
|
ap_libraries=bld.ap_common_vehicle_libraries() + [
|
||||||
'APM_Control',
|
'APM_Control',
|
||||||
'AP_Arming',
|
'AP_Arming',
|
||||||
'AP_Camera',
|
'AP_Camera',
|
||||||
|
|
|
@ -5,8 +5,8 @@ def build(bld):
|
||||||
vehicle = bld.path.name
|
vehicle = bld.path.name
|
||||||
bld.ap_stlib(
|
bld.ap_stlib(
|
||||||
name=vehicle + '_libs',
|
name=vehicle + '_libs',
|
||||||
vehicle=vehicle,
|
ap_vehicle=vehicle,
|
||||||
libraries=bld.ap_common_vehicle_libraries() + [
|
ap_libraries=bld.ap_common_vehicle_libraries() + [
|
||||||
'AC_PID',
|
'AC_PID',
|
||||||
],
|
],
|
||||||
use='mavlink',
|
use='mavlink',
|
||||||
|
|
|
@ -5,8 +5,8 @@ def build(bld):
|
||||||
vehicle = bld.path.name
|
vehicle = bld.path.name
|
||||||
bld.ap_stlib(
|
bld.ap_stlib(
|
||||||
name=vehicle + '_libs',
|
name=vehicle + '_libs',
|
||||||
vehicle=vehicle,
|
ap_vehicle=vehicle,
|
||||||
libraries=bld.ap_common_vehicle_libraries() + [
|
ap_libraries=bld.ap_common_vehicle_libraries() + [
|
||||||
'AP_ADSB',
|
'AP_ADSB',
|
||||||
'AC_AttitudeControl',
|
'AC_AttitudeControl',
|
||||||
'AC_InputManager',
|
'AC_InputManager',
|
||||||
|
|
|
@ -5,8 +5,8 @@ def build(bld):
|
||||||
vehicle = bld.path.name
|
vehicle = bld.path.name
|
||||||
bld.ap_stlib(
|
bld.ap_stlib(
|
||||||
name=vehicle + '_libs',
|
name=vehicle + '_libs',
|
||||||
vehicle=vehicle,
|
ap_vehicle=vehicle,
|
||||||
libraries=bld.ap_common_vehicle_libraries() + [
|
ap_libraries=bld.ap_common_vehicle_libraries() + [
|
||||||
'APM_Control',
|
'APM_Control',
|
||||||
'APM_OBC',
|
'APM_OBC',
|
||||||
'AP_ADSB',
|
'AP_ADSB',
|
||||||
|
|
|
@ -11,8 +11,8 @@ def build(bld):
|
||||||
|
|
||||||
bld.ap_stlib(
|
bld.ap_stlib(
|
||||||
name=vehicle + '_libs',
|
name=vehicle + '_libs',
|
||||||
vehicle=vehicle,
|
ap_vehicle=vehicle,
|
||||||
libraries=bld.ap_common_vehicle_libraries() + [
|
ap_libraries=bld.ap_common_vehicle_libraries() + [
|
||||||
'AP_InertialNav',
|
'AP_InertialNav',
|
||||||
],
|
],
|
||||||
use='mavlink',
|
use='mavlink',
|
||||||
|
|
|
@ -166,13 +166,13 @@ def unique_list(items):
|
||||||
def ap_stlib(bld, **kw):
|
def ap_stlib(bld, **kw):
|
||||||
if 'name' not in kw:
|
if 'name' not in kw:
|
||||||
bld.fatal('Missing name for ap_stlib')
|
bld.fatal('Missing name for ap_stlib')
|
||||||
if 'vehicle' not in kw:
|
if 'ap_vehicle' not in kw:
|
||||||
bld.fatal('Missing vehicle for ap_stlib')
|
bld.fatal('Missing ap_vehicle for ap_stlib')
|
||||||
if 'libraries' not in kw:
|
if 'ap_libraries' not in kw:
|
||||||
bld.fatal('Missing libraries for ap_stlib')
|
bld.fatal('Missing ap_libraries for ap_stlib')
|
||||||
|
|
||||||
sources = []
|
sources = []
|
||||||
libraries = unique_list(kw['libraries'] + bld.env.AP_LIBRARIES)
|
libraries = unique_list(kw['ap_libraries'] + bld.env.AP_LIBRARIES)
|
||||||
|
|
||||||
for lib_name in libraries:
|
for lib_name in libraries:
|
||||||
lib_node = bld.srcnode.find_dir('libraries/' + lib_name)
|
lib_node = bld.srcnode.find_dir('libraries/' + lib_name)
|
||||||
|
@ -185,7 +185,7 @@ def ap_stlib(bld, **kw):
|
||||||
kw['features'] = kw.get('features', []) + bld.env.AP_STLIB_FEATURES
|
kw['features'] = kw.get('features', []) + bld.env.AP_STLIB_FEATURES
|
||||||
kw['source'] = sources
|
kw['source'] = sources
|
||||||
kw['target'] = kw['name']
|
kw['target'] = kw['name']
|
||||||
kw['defines'] = _get_legacy_defines(kw['vehicle'])
|
kw['defines'] = _get_legacy_defines(kw['ap_vehicle'])
|
||||||
kw['idx'] = _get_next_idx()
|
kw['idx'] = _get_next_idx()
|
||||||
|
|
||||||
bld.stlib(**kw)
|
bld.stlib(**kw)
|
||||||
|
|
4
wscript
4
wscript
|
@ -263,8 +263,8 @@ def _build_common_taskgens(bld):
|
||||||
# split into smaller pieces with well defined boundaries.
|
# split into smaller pieces with well defined boundaries.
|
||||||
bld.ap_stlib(
|
bld.ap_stlib(
|
||||||
name='ap',
|
name='ap',
|
||||||
vehicle='UNKNOWN',
|
ap_vehicle='UNKNOWN',
|
||||||
libraries=bld.ap_get_all_libraries(),
|
ap_libraries=bld.ap_get_all_libraries(),
|
||||||
use='mavlink',
|
use='mavlink',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue