2022-07-03 11:44:38 +03:00
|
|
|
Import("env")
|
|
|
|
|
|
|
|
env.Append(
|
|
|
|
CPPPATH=[
|
|
|
|
"#/lib/mbedtls",
|
|
|
|
"#/lib/mbedtls/include",
|
|
|
|
],
|
2022-11-02 18:15:40 +03:00
|
|
|
SDK_HEADERS=[
|
|
|
|
File("mbedtls/include/mbedtls/des.h"),
|
|
|
|
File("mbedtls/include/mbedtls/sha1.h"),
|
|
|
|
],
|
2022-07-03 11:44:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
libenv = env.Clone(FW_LIB_NAME="mbedtls")
|
|
|
|
libenv.ApplyLibFlags()
|
|
|
|
|
2022-09-19 15:39:00 +03:00
|
|
|
libenv.AppendUnique(
|
|
|
|
CCFLAGS=[
|
|
|
|
# Required for lib to be linkable with .faps
|
|
|
|
"-mword-relocations",
|
|
|
|
"-mlong-calls",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-08-07 18:09:00 +03:00
|
|
|
sources = [
|
|
|
|
"mbedtls/library/des.c",
|
|
|
|
"mbedtls/library/sha1.c",
|
|
|
|
"mbedtls/library/platform_util.c",
|
|
|
|
]
|
2022-07-03 11:44:38 +03:00
|
|
|
|
|
|
|
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
|
|
|
|
libenv.Install("${LIB_DIST_DIR}", lib)
|
|
|
|
Return("lib")
|