mirror of
https://github.com/Relintai/pandemonium_engine_minimal.git
synced 2024-12-21 16:56:50 +01:00
Setup proper scu mbedtls build.
This commit is contained in:
parent
7ee808e892
commit
ee5d1c51ae
@ -412,7 +412,7 @@ if selected_platform in platform_list:
|
||||
|
||||
# Run SCU file generation script if in a SCU build.
|
||||
if env["scu_build"]:
|
||||
methods.set_scu_folders(scu_builders.generate_scu_files(env["verbose"], env_base["target"] != "debug"), env)
|
||||
methods.set_scu_folders(scu_builders.generate_scu_files(env["verbose"], env_base["target"] != "debug", env))
|
||||
|
||||
# Must happen after the flags' definition, as configure is when most flags
|
||||
# are actually handled to change compile options, etc.
|
||||
|
@ -151,7 +151,12 @@ if env["builtin_zstd"]:
|
||||
|
||||
env.core_sources += thirdparty_obj
|
||||
|
||||
env.Prepend(CPPPATH=["#thirdparty/mbedtls/include/"])
|
||||
if env["scu_build"]:
|
||||
if env["builtin_mbedtls"] and not env["module_mbedtls_enabled"]:
|
||||
env.Prepend(CPPPATH=["crypto/mbedtls/include"])
|
||||
|
||||
if env["builtin_mbedtls"] and env["module_mbedtls_enabled"]:
|
||||
env.Prepend(CPPPATH=["#modules/mbedtls/mbedtls/include"])
|
||||
|
||||
# Pandemonium source files
|
||||
|
||||
|
@ -8,7 +8,13 @@ is_builtin = env["builtin_mbedtls"]
|
||||
has_module = env["module_mbedtls_enabled"]
|
||||
thirdparty_obj = []
|
||||
|
||||
if is_builtin or not has_module:
|
||||
if is_builtin and not has_module:
|
||||
# Use our headers for builtin or if the module is not going to be compiled.
|
||||
# We decided not to depend on system mbedtls just for these few files that can
|
||||
# be easily extracted.
|
||||
env_crypto.Prepend(CPPPATH=["mbedtls/include"])
|
||||
|
||||
if is_builtin and has_module:
|
||||
# Use our headers for builtin or if the module is not going to be compiled.
|
||||
# We decided not to depend on system mbedtls just for these few files that can
|
||||
# be easily extracted.
|
||||
|
@ -163,6 +163,8 @@ def process_folder(folders, sought_exceptions=[], includes_per_scu=0, extension=
|
||||
if len(folders) == 0:
|
||||
return
|
||||
|
||||
extensions = extension.split(" ")
|
||||
|
||||
# Construct the filename prefix from the FIRST folder name
|
||||
# e.g. "scene_3d"
|
||||
out_filename = find_section_name(folders[0])
|
||||
@ -179,16 +181,17 @@ def process_folder(folders, sought_exceptions=[], includes_per_scu=0, extension=
|
||||
_scu_folders.add(main_folder)
|
||||
|
||||
# main folder (first)
|
||||
found_includes, found_exceptions = find_files_in_folder(
|
||||
main_folder, "", found_includes, extension, sought_exceptions, found_exceptions
|
||||
)
|
||||
|
||||
# sub folders
|
||||
for d in range(1, len(folders)):
|
||||
for ext in extensions:
|
||||
found_includes, found_exceptions = find_files_in_folder(
|
||||
main_folder, folders[d], found_includes, extension, sought_exceptions, found_exceptions
|
||||
main_folder, "", found_includes, ext, sought_exceptions, found_exceptions
|
||||
)
|
||||
|
||||
# sub folders
|
||||
for d in range(1, len(folders)):
|
||||
found_includes, found_exceptions = find_files_in_folder(
|
||||
main_folder, folders[d], found_includes, ext, sought_exceptions, found_exceptions
|
||||
)
|
||||
|
||||
found_includes = sorted(found_includes)
|
||||
|
||||
# calculate how many lines to write in each file
|
||||
@ -277,8 +280,19 @@ def generate_scu_files(verbose, is_release_build, env):
|
||||
#process_folder(["core/io"])
|
||||
#process_folder(["core/crypto"])
|
||||
|
||||
process_folder(["core", "bind", "config", "containers", "error", "input", "log", "math", "object",
|
||||
"os", "string", "variant", "io", "crypto"])
|
||||
has_mbedtyls_module = False
|
||||
|
||||
try:
|
||||
has_mbedtyls_module = env["module_mbedtls_enabled"]
|
||||
except:
|
||||
pass
|
||||
|
||||
if has_mbedtyls_module:
|
||||
process_folder(["core", "bind", "config", "containers", "error", "input", "log", "math", "object",
|
||||
"os", "string", "variant", "io", "crypto"])
|
||||
else:
|
||||
process_folder(["core", "bind", "config", "containers", "error", "input", "log", "math", "object",
|
||||
"os", "string", "variant", "io", "crypto", "crypto/mbedtls/library"], [], 0, "cpp c")
|
||||
|
||||
process_folder(["drivers/gles2"])
|
||||
process_folder(["drivers/unix"])
|
||||
|
Loading…
Reference in New Issue
Block a user