waf: boards: check for librt when necessary

This commit is contained in:
Gustavo Jose de Sousa 2016-05-19 17:25:49 -03:00 committed by Lucas De Marchi
parent f10c150e70
commit 0f60c8ed4f
1 changed files with 8 additions and 1 deletions

View File

@ -184,9 +184,13 @@ class sitl(Board):
'-O3',
]
cfg.check_librt()
env.LIB += [
'm',
]
env.LIB += cfg.env.LIB_RT
env.LINKFLAGS += ['-pthread',]
env.AP_LIBRARIES += [
'AP_HAL_SITL',
@ -212,10 +216,13 @@ class linux(Board):
'-O3',
]
cfg.check_librt()
env.LIB += [
'm',
'rt',
]
env.LIB += cfg.env.LIB_RT
env.LINKFLAGS += ['-pthread',]
env.AP_LIBRARIES = [
'AP_HAL_Linux',