waf: boards: small change to use waf standard

This commit is contained in:
Francisco Ferreira 2018-09-02 18:04:13 +01:00 committed by Andrew Tridgell
parent d9ad3eeab0
commit 1e036e4d4e
1 changed files with 5 additions and 3 deletions

View File

@ -5,6 +5,7 @@ from collections import OrderedDict
import sys, os
import waflib
from waflib import Utils
from waflib.Configure import conf
_board_classes = {}
@ -319,12 +320,13 @@ class sitl(Board):
if fnmatch.fnmatch(f, "font*bin"):
env.ROMFS_FILES += [(f,'libraries/AP_OSD/fonts/'+f)]
if sys.platform == 'cygwin':
if cfg.env.DEST_OS == 'cygwin':
env.LIB += [
'winmm',
]
env.CXXFLAGS += ['-DCYGWIN_BUILD']
if Utils.unversioned_sys_platform() == 'cygwin':
env.CXXFLAGS += ['-DCYGWIN_BUILD']
if 'clang++' in cfg.env.COMPILER_CXX:
print("Disabling SLP for clang++")
@ -404,7 +406,7 @@ class chibios(Board):
'-fno-threadsafe-statics',
]
if sys.platform == 'cygwin':
if Utils.unversioned_sys_platform() == 'cygwin':
env.CXXFLAGS += ['-DCYGWIN_BUILD']
bldnode = cfg.bldnode.make_node(self.name)