summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/foldercc6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/foldercc b/scripts/foldercc
index 3bdc022..8ece427 100755
--- a/scripts/foldercc
+++ b/scripts/foldercc
@@ -107,10 +107,10 @@ def main(argv):
subprocess.run(["rm", "-rf", out_path])
os.mkdir(out_path)
makefile = open(f"{out_path}/Makefile", "w")
- makefile.write("a.out: " + ' '.join([f"{i}.o" for i in range(len(all_os))]) + "\n")
+ makefile.write("a.out: " + ' '.join([f"{i}.o" for i in range(len(all_os))]) + " $(OTHER_OBJS)\n")
argstr = list(map(shlex.quote, stripped_args))
argstr = ' '.join(argstr)
- makefile.write(f"\t$(CC) $^ -o $@ {argstr}\n\n")
+ makefile.write(f"\t$(CC) $(CFLAGS) $^ -o $@ {argstr}\n\n")
for i, o_file in enumerate(all_os):
f = open(o_file, "rb")
if f.read(5) == b"DIETC":
@@ -119,7 +119,7 @@ def main(argv):
with open(f"{out_path}/{i}.c", "wb") as i_file:
i_file.write(f.read())
makefile.write(f"{i}.o: {i}.c\n")
- makefile.write(f"\t$(CC) -c $^ -o $@ {argstr} -Wno-builtin-declaration-mismatch\n\n")
+ makefile.write(f"\t$(CC) $(CFLAGS) -c $^ -o $@ {argstr} -Wno-builtin-declaration-mismatch\n\n")
# TODO: include a postprocessing pass ...
else:
# regular .o
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback