Skip to content

Commit

Permalink
Removed creation and inclusion of temp folder for dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Nov 29, 2024
1 parent e9237ec commit c21acb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.vscode/
dist/
temp/
21 changes: 6 additions & 15 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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:")
Expand Down Expand Up @@ -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:")
Expand Down Expand Up @@ -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:")
Expand Down Expand Up @@ -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:")
Expand Down

0 comments on commit c21acb0

Please sign in to comment.