ardupilot/Tools/ardupilotwaf/littlefs.py

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

26 lines
747 B
Python
Raw Normal View History

2023-06-12 12:30:02 -03:00
# 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',
2024-12-12 16:57:05 -04:00
source=['modules/littlefs/lfs.c', 'modules/littlefs/lfs_util.c', 'modules/littlefs/bd/lfs_filebd.c'],
2023-06-12 12:30:02 -03:00
target='littlefs',
defines=['LFS_NO_DEBUG', 'LFS_NO_WARN', 'LFS_NO_ERROR', 'LFS_NO_ASSERT'],
2023-06-12 12:30:02 -03:00
cflags=['-Wno-format', '-Wno-format-extra-args', '-Wno-shadow', '-Wno-unused-function', '-Wno-missing-declarations']
)
return bld.stlib(**kw)