24 lines
508 B
Bash
24 lines
508 B
Bash
|
#!/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
|