made compiling better

This commit is contained in:
aiden 2022-06-02 23:21:57 +01:00
parent c6229fd9c9
commit 2d8e0d89ec
No known key found for this signature in database
GPG Key ID: 0D87FF3415416DB1
7 changed files with 22 additions and 45 deletions

View File

@ -1,18 +0,0 @@
#!/usr/bin/env python3
import os, subprocess, sys
file_dirname = os.path.dirname(__file__)
build_path = os.path.join(
file_dirname,
"..",
"build",
""
)
os.chdir(build_path)
gcc = ["/usr/bin/gcc", "-I" + os.path.join(file_dirname, "..", "inc"), "-c"]
for directory, _, files in os.walk(file_dirname):
for file_name in files:
if file_name[-2:] != ".c":
continue
gcc.append(os.path.join(directory, file_name))
gcc.extend(sys.argv[1:])
subprocess.run(gcc)

View File

@ -1,13 +1,26 @@
#!/usr/bin/env python3
import os, subprocess, sys
file_dirname = os.path.dirname(__file__)
build_path = os.path.join(
file_dirname,
"build",
""
)
gcc = ["/usr/bin/gcc", "-lpthread", "-lssl", "-lcrypto", "-o", os.path.join(build_path, "bidirectiond"), "-I" + os.path.join(file_dirname, "build")]
for directory, _, files in os.walk(build_path):
gcc = [
"/usr/bin/gcc",
"-lpthread", "-lssl", "-lcrypto",
"-o", os.path.join(file_dirname, "output", "bidirectiond"),
"-I" + os.path.join(file_dirname, "inc")
]
for directory, _, files in os.walk(os.path.join(file_dirname, "bidirectiond")):
for file_name in files:
if file_name[-2:] != ".c":
continue
gcc.append(os.path.join(directory, file_name))
for directory, _, files in os.walk(os.path.join(file_dirname, "core")):
for file_name in files:
if file_name[-2:] != ".c":
continue
gcc.append(os.path.join(directory, file_name))
for directory, _, files in os.walk(os.path.join(file_dirname, "output")):
for file_name in files:
if file_name[-2:] != ".o":
continue

View File

@ -1,18 +0,0 @@
#!/usr/bin/env python3
import os, subprocess, sys
file_dirname = os.path.dirname(__file__)
build_path = os.path.join(
file_dirname,
"..",
"build",
""
)
os.chdir(build_path)
gcc = ["/usr/bin/gcc", "-I" + os.path.join(file_dirname, "inc"), "-c"]
for directory, _, files in os.walk(file_dirname):
for file_name in files:
if file_name[-2:] != ".c":
continue
gcc.append(os.path.join(directory, file_name))
gcc.extend(sys.argv[1:])
subprocess.run(gcc)

View File

@ -1 +0,0 @@
../hashmap/headers

1
inc/hashmap Symbolic link
View File

@ -0,0 +1 @@
../core/hashmap/headers/

View File

@ -96,7 +96,7 @@ subprocess.run([
"gcc",
"-c", fd.name,
"-o", os.path.join(dir_path, "..", "build", "glue.o"),
"-o", os.path.join(dir_path, "..", "output", "glue.o"),
"-I" + os.path.join(dir_path, "..", "inc"),
])