mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
32 lines
556 B
Text
32 lines
556 B
Text
|
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")
|