mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-02 17:29:14 +00:00
56 lines
1.2 KiB
Text
56 lines
1.2 KiB
Text
Import("ENV")
|
|
|
|
|
|
from fbt.appmanifest import FlipperAppType
|
|
|
|
appenv = ENV.Clone(tools=["fbt_extapps"])
|
|
|
|
appenv.Replace(
|
|
LINKER_SCRIPT="application-ext",
|
|
STRIPFLAGS=[
|
|
"--strip-debug",
|
|
"--strip-unneeded",
|
|
"-d",
|
|
"-g",
|
|
"-S",
|
|
],
|
|
)
|
|
|
|
appenv.AppendUnique(
|
|
CCFLAGS=[
|
|
"-Os",
|
|
"-ggdb3",
|
|
"-mword-relocations",
|
|
"-mlong-calls",
|
|
"-fno-common",
|
|
"-nostdlib",
|
|
"-fvisibility=hidden",
|
|
],
|
|
LINKFLAGS=[
|
|
"-r",
|
|
"-s",
|
|
# "-Bsymbolic",
|
|
"-nostartfiles",
|
|
"-mlong-calls",
|
|
"-fno-common",
|
|
"-nostdlib",
|
|
"-Wl,--gc-sections",
|
|
"-Wl,--no-export-dynamic",
|
|
"-fvisibility=hidden",
|
|
"-Wl,-e${APP_ENTRY}",
|
|
],
|
|
)
|
|
|
|
|
|
extapps = []
|
|
for apptype in (FlipperAppType.PLUGIN, FlipperAppType.EXTERNAL):
|
|
for app in appenv["APPBUILD"].get_apps_of_type(apptype):
|
|
extapps.append(appenv.BuildAppElf(app))
|
|
|
|
# Ugly access to global option
|
|
if extra_app_list := GetOption("extra_ext_apps"):
|
|
for extra_app in extra_app_list.split(","):
|
|
extapps.append(appenv.BuildAppElf(appenv["APPMGR"].get(extra_app)))
|
|
|
|
Alias(appenv["FIRMWARE_BUILD_CFG"] + "_extapps", extapps)
|
|
Return("extapps")
|