quadrants/build/build.sh

24 lines
508 B
Bash
Raw Normal View History

2023-02-27 14:02:30 +01:00
#!/bin/bash
module_files=(
"core/core.cpp"
"main.cpp"
)
object_files=""
# Module to object compilation stage.
for i in "${module_files[@]}"
do
module_file=$(dirname "${i}")
object_file="../output/${module_file//\//.}.o"
echo "Compiling module: \"${i}\""
c++ ../source/${i} -c -o ${object_file} -g -Wshadow
object_files="$object_files $object_file"
done
# Object to executable linkage stage.
c++ -o ../output/quadrants ${object_files} -g -lraylib -lm
rm ${object_files}
cp -a ../assets/. ../output