2018-03-28 21:45:13 -03:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
def build(bld):
|
2019-05-26 22:38:46 -03:00
|
|
|
if not bld.env.BOOTLOADER:
|
|
|
|
return
|
|
|
|
|
|
|
|
# build external libcanard library
|
|
|
|
bld.stlib(source='../../modules/libcanard/canard.c',
|
|
|
|
target='libcanard')
|
|
|
|
|
|
|
|
bld.ap_program(
|
|
|
|
use=['ap','libcanard'],
|
|
|
|
program_groups='bootloader',
|
|
|
|
includes=[bld.env.SRCROOT + '/modules/libcanard',
|
|
|
|
bld.env.BUILDROOT + '/modules/libcanard/dsdlc_generated']
|
|
|
|
)
|
|
|
|
|
|
|
|
bld(
|
|
|
|
# build libcanard headers
|
|
|
|
source=bld.path.ant_glob("modules/uavcan/dsdl/**/*.uavcan libraries/AP_UAVCAN/dsdl/**/*.uavcan"),
|
|
|
|
rule="python3 ../../modules/libcanard/dsdl_compiler/libcanard_dsdlc --header_only --outdir ${BUILDROOT}/modules/libcanard/dsdlc_generated ../../modules/uavcan/dsdl/uavcan",
|
|
|
|
group='dynamic_sources',
|
|
|
|
)
|
|
|
|
|