ardupilot/libraries/AP_Networking/wscript

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.2 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env python3
import pathlib
def configure(cfg):
extra_src = [
'modules/ChibiOS/ext/lwip/src/core/*c',
'modules/ChibiOS/ext/lwip/src/core/ipv4/*c',
'modules/ChibiOS/ext/lwip/src/api/*c',
'modules/ChibiOS/ext/lwip/src/netif/*c',
'modules/ChibiOS/ext/lwip/src/netif/ppp/*c',
]
extra_src_inc = [
'modules/ChibiOS/ext/lwip/src/include',
]
if cfg.env.BOARD_CLASS == "SITL":
extra_src.extend(['libraries/AP_Networking/lwip_hal/arch/*cpp'])
extra_src_inc.extend(['libraries/AP_Networking/config',
'libraries/AP_Networking/lwip_hal/include'])
if cfg.env.BOARD_CLASS == "ChibiOS":
extra_src.extend(['libraries/AP_Networking/lwip_hal/arch/*cpp'])
extra_src_inc.extend(['libraries/AP_Networking/config',
'libraries/AP_Networking/lwip_hal/include'])
cfg.env.AP_LIB_EXTRA_SOURCES['AP_Networking'] = []
for pattern in extra_src:
s = cfg.srcnode.ant_glob(pattern, dir=False, src=True)
for x in s:
cfg.env.AP_LIB_EXTRA_SOURCES['AP_Networking'].append(str(x))
for inc in extra_src_inc:
cfg.env.INCLUDES += [str(cfg.srcnode.make_node(inc))]