build_profile, make.log and other stuff

This commit is contained in:
2023-02-13 19:24:47 +06:00
parent 1b38b43c54
commit a0cdbf5522
15 changed files with 315 additions and 140 deletions

View File

@@ -1,5 +1,19 @@
#!/bin/bash
# delete old objects
clean_dir "$OBJDIR/objects"
# copy profiling info
prof_files=$(find "$OBJDIR/profile/" -name '*.gcda')
if [ -z "$prof_files" ]; then
myprint "${YELLOW}no profiling info found"
else
for prof_file in $prof_files; do
myprint "${GRAY}$(basename $prof_file)"
cp $prof_file "$OBJDIR/objects/"
done
fi
compile_c "$C_ARGS" "$SRC_C $TESTS_C"
compile_cpp "$CPP_ARGS" "$SRC_CPP $TESTS_CPP"
link "$CPP_ARGS" "$EXEC_FILE"
link "$LINKER_ARGS" "$EXEC_FILE"