unleashed-firmware/lib/nanopb.scons

32 lines
556 B
Plaintext
Raw Normal View History

from fbt.util import GLOB_FILE_EXCLUSION
Import("env")
env.Append(
CPPPATH=[
"#/lib/nanopb",
],
CPPDEFINES=[
"PB_ENABLE_MALLOC",
],
SDK_HEADERS=[
File("nanopb/pb.h"),
File("nanopb/pb_decode.h"),
File("nanopb/pb_encode.h"),
],
)
libenv = env.Clone(FW_LIB_NAME="nanopb")
libenv.ApplyLibFlags()
sources = Glob(
"nanopb/*.c*",
exclude=GLOB_FILE_EXCLUSION,
source=True,
)
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
libenv.Install("${LIB_DIST_DIR}", lib)
Return("lib")