mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
waf: don't build CAN libraries if CAN not supported
This commit is contained in:
parent
2fe08b6177
commit
a136c28122
@ -17,6 +17,13 @@ SOURCE_EXTS = [
|
|||||||
'*.cpp',
|
'*.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
COMMON_VEHICLE_DEPENDENT_CAN_LIBRARIES = [
|
||||||
|
'AP_CANManager',
|
||||||
|
'AP_KDECAN',
|
||||||
|
'AP_PiccoloCAN',
|
||||||
|
'AP_PiccoloCAN/piccolo_protocol',
|
||||||
|
]
|
||||||
|
|
||||||
COMMON_VEHICLE_DEPENDENT_LIBRARIES = [
|
COMMON_VEHICLE_DEPENDENT_LIBRARIES = [
|
||||||
'AP_Airspeed',
|
'AP_Airspeed',
|
||||||
'AP_AccelCal',
|
'AP_AccelCal',
|
||||||
@ -27,7 +34,6 @@ COMMON_VEHICLE_DEPENDENT_LIBRARIES = [
|
|||||||
'AP_BattMonitor',
|
'AP_BattMonitor',
|
||||||
'AP_BoardConfig',
|
'AP_BoardConfig',
|
||||||
'AP_Camera',
|
'AP_Camera',
|
||||||
'AP_CANManager',
|
|
||||||
'AP_Common',
|
'AP_Common',
|
||||||
'AP_Compass',
|
'AP_Compass',
|
||||||
'AP_Declination',
|
'AP_Declination',
|
||||||
@ -35,7 +41,6 @@ COMMON_VEHICLE_DEPENDENT_LIBRARIES = [
|
|||||||
'AP_HAL',
|
'AP_HAL',
|
||||||
'AP_HAL_Empty',
|
'AP_HAL_Empty',
|
||||||
'AP_InertialSensor',
|
'AP_InertialSensor',
|
||||||
'AP_KDECAN',
|
|
||||||
'AP_Math',
|
'AP_Math',
|
||||||
'AP_Mission',
|
'AP_Mission',
|
||||||
'AP_DAL',
|
'AP_DAL',
|
||||||
@ -74,8 +79,6 @@ COMMON_VEHICLE_DEPENDENT_LIBRARIES = [
|
|||||||
'AP_SBusOut',
|
'AP_SBusOut',
|
||||||
'AP_IOMCU',
|
'AP_IOMCU',
|
||||||
'AP_Parachute',
|
'AP_Parachute',
|
||||||
'AP_PiccoloCAN',
|
|
||||||
'AP_PiccoloCAN/piccolo_protocol',
|
|
||||||
'AP_RAMTRON',
|
'AP_RAMTRON',
|
||||||
'AP_RCProtocol',
|
'AP_RCProtocol',
|
||||||
'AP_Radio',
|
'AP_Radio',
|
||||||
@ -249,11 +252,8 @@ def ap_get_all_libraries(bld):
|
|||||||
def ap_common_vehicle_libraries(bld):
|
def ap_common_vehicle_libraries(bld):
|
||||||
libraries = COMMON_VEHICLE_DEPENDENT_LIBRARIES
|
libraries = COMMON_VEHICLE_DEPENDENT_LIBRARIES
|
||||||
|
|
||||||
if bld.env.DEST_BINFMT == 'pe':
|
if bld.env.with_can or bld.env.HAL_NUM_CAN_IFACES:
|
||||||
libraries += [
|
libraries.extend(COMMON_VEHICLE_DEPENDENT_CAN_LIBRARIES)
|
||||||
'AC_Fence',
|
|
||||||
'AC_AttitudeControl',
|
|
||||||
]
|
|
||||||
|
|
||||||
return libraries
|
return libraries
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user