From c21acb08f373e8b6906c5d934a3fad67eeafef72 Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Sat, 30 Nov 2024 05:54:31 +0800 Subject: [PATCH] Removed creation and inclusion of temp folder for dependencies. --- .gitignore | 1 - build.py | 21 ++++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 6d0d95f..3562f45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ .vscode/ dist/ -temp/ \ No newline at end of file diff --git a/build.py b/build.py index 5af426d..ce67a90 100644 --- a/build.py +++ b/build.py @@ -27,11 +27,6 @@ shutil.rmtree(OUT_DIR) os.makedirs(OUT_DIR) -TEMP_DIR = 'temp' -if os.path.exists(TEMP_DIR): - shutil.rmtree(TEMP_DIR) -os.makedirs(TEMP_DIR) - OUTPUT_EXECUTABLE = os.path.join(OUT_DIR, 'n8') OUTPUT_LIBRARY = os.path.join(OUT_DIR, 'n8-std') OUTPUT_CORE = OUTPUT_LIBRARY + '-core.a' @@ -113,8 +108,7 @@ def get_ext_instructions(): ] + lib_headers + lib_source_files + cpp_files + ['-o', OUTPUT_EXECUTABLE] lib_build_args = [ 'g++', '-static', '-static-libgcc', '-Iinclude', - '-Istd', '-I' + os.path.join(TEMP_DIR, 'include'), - '-shared', '-o', OUTPUT_LIBRARY + '.dll' + '-Istd', '-shared', '-o', OUTPUT_LIBRARY + '.dll' ] + ext_instructions + lib_headers + lib_source_files + cpp_files + cc_files print("Executing:") @@ -146,9 +140,8 @@ def get_ext_instructions(): '-funroll-loops', '-ffast-math', '-D__TERMUX__' ] + lib_headers + lib_source_files + cpp_files + ['-o', OUTPUT_EXECUTABLE] lib_build_args = [ - 'g++', '-Iinclude', - '-Istd', '-I' + os.path.join(TEMP_DIR, 'include'), - '-fPIC', '-shared', '-o', OUTPUT_LIBRARY + '.so' + 'g++', '-Iinclude', '-Istd', '-fPIC', + '-shared', '-o', OUTPUT_LIBRARY + '.so' ] + ext_instructions + lib_headers + lib_source_files + cpp_files + cc_files print("Executing:") @@ -180,9 +173,8 @@ def get_ext_instructions(): '-march=native', '-funroll-loops', '-ffast-math' ] + lib_headers + lib_source_files + cpp_files + ['-o', OUTPUT_EXECUTABLE] lib_build_args = [ - 'g++', '-Iinclude', - '-Istd', '-I' + os.path.join(TEMP_DIR, 'include'), - '-fPIC', '-shared', '-o', OUTPUT_LIBRARY + '.so' + 'g++', '-Iinclude', '-Istd', '-fPIC', + '-shared', '-o', OUTPUT_LIBRARY + '.so' ] + ext_instructions + lib_headers + lib_source_files + cpp_files + cc_files print("Executing:") @@ -217,8 +209,7 @@ def get_ext_instructions(): ] + lib_headers + lib_source_files + cpp_files + ['-o', OUTPUT_EXECUTABLE] lib_build_args = [ '/opt/homebrew/opt/llvm/bin/clang++', '-Iinclude', - '-Istd', '-I' + os.path.join(TEMP_DIR, 'include'), - '-shared', '-o', OUTPUT_LIBRARY + '.dylib' + '-Istd', '-shared', '-o', OUTPUT_LIBRARY + '.dylib' ] + ext_instructions + lib_headers + lib_source_files + cpp_files + cc_files print("Executing:")