18 lines
598 B
Bash
Executable File
18 lines
598 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# delete old objects
|
|
clean_dir "$OBJDIR/objects"
|
|
rm -f "$EXEC_FILE"
|
|
|
|
# copy profiling info to $OBJDIR/objects/
|
|
prof_files=$(find "$OBJDIR/profile/" -type f,l | tr '\n' ' ')
|
|
if [ ! -z "$prof_files" ]; then
|
|
myprint "${GREEN}profiling info found, copying to $OBJDIR/objects/"
|
|
myprint "${GRAY}$prof_files"
|
|
cp $prof_files "$OBJDIR/objects/"
|
|
fi
|
|
|
|
[ ! -z "$SRC_C" ] && compile_c "$CMP_C" "$STD_C" "$WARN_C" "$C_ARGS" "$INCLUDE" "$SRC_C"
|
|
[ ! -z "$SRC_CPP" ] && compile_cpp "$CMP_CPP" "$STD_CPP" "$WARN_CPP" "$CPP_ARGS" "$INCLUDE" "$SRC_CPP"
|
|
link "$LINKER_ARGS" "$EXEC_FILE"
|