2022-06-26 15:00:03 +03:00
|
|
|
Import("env")
|
|
|
|
|
2023-02-08 12:35:38 +03:00
|
|
|
from fbt.util import GLOB_FILE_EXCLUSION
|
|
|
|
|
2022-06-26 15:00:03 +03:00
|
|
|
env.Append(
|
|
|
|
CPPPATH=[
|
|
|
|
"#/lib/digital_signal",
|
|
|
|
"#/lib/fnv1a_hash",
|
|
|
|
"#/lib/heatshrink",
|
|
|
|
"#/lib/micro-ecc",
|
|
|
|
"#/lib/nanopb",
|
|
|
|
"#/lib/u8g2",
|
|
|
|
],
|
|
|
|
CPPDEFINES=[
|
|
|
|
"PB_ENABLE_MALLOC",
|
|
|
|
],
|
2022-09-14 19:11:38 +03:00
|
|
|
SDK_HEADERS=[
|
2022-11-02 18:15:40 +03:00
|
|
|
File("micro-ecc/uECC.h"),
|
2022-09-14 19:11:38 +03:00
|
|
|
],
|
2022-06-26 15:00:03 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
libenv = env.Clone(FW_LIB_NAME="misc")
|
|
|
|
libenv.ApplyLibFlags()
|
|
|
|
|
|
|
|
sources = []
|
|
|
|
|
|
|
|
libs_recurse = [
|
|
|
|
"digital_signal",
|
|
|
|
"micro-ecc",
|
|
|
|
"u8g2",
|
|
|
|
"update_util",
|
|
|
|
]
|
|
|
|
|
|
|
|
for lib in libs_recurse:
|
|
|
|
sources += libenv.GlobRecursive("*.c*", lib)
|
|
|
|
|
|
|
|
libs_plain = [
|
|
|
|
"heatshrink",
|
|
|
|
"nanopb",
|
|
|
|
]
|
|
|
|
|
|
|
|
for lib in libs_plain:
|
2023-02-08 12:35:38 +03:00
|
|
|
sources += Glob(
|
|
|
|
lib + "/*.c*",
|
|
|
|
exclude=GLOB_FILE_EXCLUSION,
|
|
|
|
source=True,
|
|
|
|
)
|
2022-06-26 15:00:03 +03:00
|
|
|
|
|
|
|
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
|
|
|
|
libenv.Install("${LIB_DIST_DIR}", lib)
|
|
|
|
Return("lib")
|