2022-06-26 15:00:03 +03:00
|
|
|
from fbt.version import get_fast_git_version_id
|
|
|
|
|
|
|
|
|
2023-05-03 08:48:49 +03:00
|
|
|
Import("env")
|
|
|
|
|
2022-06-26 15:00:03 +03:00
|
|
|
env.Append(
|
|
|
|
CPPPATH=[
|
|
|
|
"#/lib/toolbox",
|
|
|
|
],
|
2023-12-01 12:16:48 +03:00
|
|
|
LINT_SOURCES=[
|
|
|
|
Dir("."),
|
|
|
|
],
|
2022-09-14 19:11:38 +03:00
|
|
|
SDK_HEADERS=[
|
2023-05-26 15:57:24 +03:00
|
|
|
File("api_lock.h"),
|
2022-11-10 07:13:02 +03:00
|
|
|
File("value_index.h"),
|
2023-08-09 10:52:41 +03:00
|
|
|
File("compress.h"),
|
2022-11-02 18:15:40 +03:00
|
|
|
File("manchester_decoder.h"),
|
|
|
|
File("manchester_encoder.h"),
|
|
|
|
File("path.h"),
|
2023-09-01 08:57:49 +03:00
|
|
|
File("name_generator.h"),
|
2022-11-02 18:15:40 +03:00
|
|
|
File("crc32_calc.h"),
|
|
|
|
File("dir_walk.h"),
|
|
|
|
File("args.h"),
|
|
|
|
File("saved_struct.h"),
|
|
|
|
File("version.h"),
|
2022-12-30 15:52:53 +03:00
|
|
|
File("float_tools.h"),
|
2022-11-02 18:15:40 +03:00
|
|
|
File("tar/tar_archive.h"),
|
|
|
|
File("stream/stream.h"),
|
|
|
|
File("stream/file_stream.h"),
|
|
|
|
File("stream/string_stream.h"),
|
|
|
|
File("stream/buffered_file_stream.h"),
|
|
|
|
File("protocols/protocol_dict.h"),
|
2023-03-02 16:23:33 +03:00
|
|
|
File("pretty_format.h"),
|
2023-04-01 21:40:37 +03:00
|
|
|
File("hex.h"),
|
NFC refactoring (#3050)
"A long time ago in a galaxy far, far away...." we started NFC subsystem refactoring.
Starring:
- @gornekich - NFC refactoring project lead, architect, senior developer
- @gsurkov - architect, senior developer
- @RebornedBrain - senior developer
Supporting roles:
- @skotopes, @DrZlo13, @hedger - general architecture advisors, code review
- @Astrrra, @doomwastaken, @Hellitron, @ImagineVagon333 - quality assurance
Special thanks:
@bettse, @pcunning, @nxv, @noproto, @AloneLiberty and everyone else who has been helping us all this time and contributing valuable knowledges, ideas and source code.
2023-10-24 06:08:09 +03:00
|
|
|
File("simple_array.h"),
|
|
|
|
File("bit_buffer.h"),
|
2023-12-18 17:30:56 +03:00
|
|
|
File("keys_dict.h"),
|
2024-05-20 20:23:47 +03:00
|
|
|
File("pulse_protocols/pulse_glue.h"),
|
|
|
|
File("md5_calc.h"),
|
|
|
|
File("varint.h"),
|
2022-09-14 19:11:38 +03:00
|
|
|
],
|
2022-06-26 15:00:03 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
libenv = env.Clone(tools=["fbt_version"], FW_LIB_NAME="toolbox")
|
|
|
|
libenv.ApplyLibFlags()
|
|
|
|
|
|
|
|
|
|
|
|
# Git Version management
|
|
|
|
version_depends = []
|
|
|
|
version_id_data = get_fast_git_version_id()
|
|
|
|
if version_id_data:
|
|
|
|
version_depends = Value(version_id_data)
|
|
|
|
|
|
|
|
# Only invoke version generator if preliminary check target (version_depends) has changed
|
|
|
|
build_version = libenv.VersionBuilder(
|
|
|
|
Dir("."),
|
|
|
|
version_depends,
|
|
|
|
)
|
|
|
|
|
|
|
|
fw_version_json = libenv.InstallAs(
|
|
|
|
"${BUILD_DIR}/${FIRMWARE_BUILD_CFG}.json", "version.json"
|
|
|
|
)
|
2022-08-22 20:06:17 +03:00
|
|
|
Alias("version_json", fw_version_json)
|
2022-06-26 15:00:03 +03:00
|
|
|
env.Append(FW_VERSION_JSON=fw_version_json)
|
|
|
|
|
|
|
|
# Default(fw_version_json)
|
|
|
|
|
|
|
|
|
|
|
|
if not version_depends:
|
|
|
|
libenv.Precious(build_version)
|
|
|
|
libenv.AlwaysBuild(build_version)
|
|
|
|
|
|
|
|
sources = libenv.GlobRecursive("*.c")
|
|
|
|
|
2022-08-22 20:06:17 +03:00
|
|
|
libenv.Append(CPPPATH=[libenv.Dir(".")])
|
2022-06-26 15:00:03 +03:00
|
|
|
|
|
|
|
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
|
|
|
|
libenv.Install("${LIB_DIST_DIR}", lib)
|
|
|
|
Return("lib")
|