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