mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-20 14:54:09 -04:00
26 lines
747 B
Python
26 lines
747 B
Python
# encoding: utf-8
|
|
|
|
"""
|
|
Adds support for building littlefs as part of a Waf build
|
|
"""
|
|
|
|
from waflib.Configure import conf
|
|
|
|
def configure(cfg):
|
|
cfg.env.append_value('GIT_SUBMODULES', 'littlefs')
|
|
cfg.env.prepend_value('INCLUDES', [
|
|
cfg.srcnode.abspath() + '/modules/littlefs/',
|
|
])
|
|
|
|
|
|
@conf
|
|
def littlefs(bld, **kw):
|
|
kw.update(
|
|
name='littlefs',
|
|
source=['modules/littlefs/lfs.c', 'modules/littlefs/lfs_util.c', 'modules/littlefs/bd/lfs_filebd.c'],
|
|
target='littlefs',
|
|
defines=['LFS_NO_DEBUG', 'LFS_NO_WARN', 'LFS_NO_ERROR', 'LFS_NO_ASSERT'],
|
|
cflags=['-Wno-format', '-Wno-format-extra-args', '-Wno-shadow', '-Wno-unused-function', '-Wno-missing-declarations']
|
|
)
|
|
return bld.stlib(**kw)
|