mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-30 08:20:21 +00:00
ed385594a3
* faploader: more subsystem headers in API table; not counting header entries for SDK version change * subghz: removed dead function * Adjusted API version * hal: removed furi_hal_power_get_system_voltage * lib: mbedtls: additional flags for .fap linkage * fbt: rebuilding assets when git commit id changes * fbt: removed assets rebuild on git commit id change; added explicit dependency for SDK source on compiled assets parts; removed unneeded sdk regeneration runs * fbt: changed stock plugins to EXTERNAL apps; restored building app as a PLUGIN as a part of main fw as well as a .fap; readme fixes * fbt: restored certain apps to PLUGIN type * fbt: app manifests: renamed version->fap_version, added extra fields * fbt: fixed version processing after rename Co-authored-by: あく <alleteam@gmail.com>
67 lines
1.8 KiB
Python
67 lines
1.8 KiB
Python
Import("env")
|
|
|
|
from fbt.version import get_fast_git_version_id
|
|
|
|
|
|
env.Append(
|
|
CPPPATH=[
|
|
"#/lib/toolbox",
|
|
],
|
|
SDK_HEADERS=[
|
|
File("#/lib/toolbox/manchester_decoder.h"),
|
|
File("#/lib/toolbox/manchester_encoder.h"),
|
|
File("#/lib/toolbox/path.h"),
|
|
File("#/lib/toolbox/random_name.h"),
|
|
File("#/lib/toolbox/hmac_sha256.h"),
|
|
File("#/lib/toolbox/crc32_calc.h"),
|
|
File("#/lib/toolbox/dir_walk.h"),
|
|
File("#/lib/toolbox/md5.h"),
|
|
File("#/lib/toolbox/args.h"),
|
|
File("#/lib/toolbox/saved_struct.h"),
|
|
File("#/lib/toolbox/version.h"),
|
|
File("#/lib/toolbox/tar/tar_archive.h"),
|
|
File("#/lib/toolbox/stream/stream.h"),
|
|
File("#/lib/toolbox/stream/file_stream.h"),
|
|
File("#/lib/toolbox/stream/string_stream.h"),
|
|
File("#/lib/toolbox/stream/buffered_file_stream.h"),
|
|
File("#/lib/toolbox/protocols/protocol_dict.h"),
|
|
],
|
|
)
|
|
|
|
|
|
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"
|
|
)
|
|
Alias("version_json", fw_version_json)
|
|
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")
|
|
|
|
libenv.Append(CPPPATH=[libenv.Dir(".")])
|
|
|
|
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
|
|
libenv.Install("${LIB_DIST_DIR}", lib)
|
|
Return("lib")
|