#! /bin/bash source build.env [[ "$1" == "debug" ]] && cflags+=" ${debug_cflags[@]}" [[ "$1" == "relsym" ]] && cflags+=" -g" src=$(find . -name '*.c') echo "cc: $cc" echo "cflags: ${cflags[@]}" echo "ldflags: ${ldflags[@]}" echo "out: $out" set -x # If the compilation time gets so long that incremental compilation is a # necessity, the project is undeserving of the name "microengine". Hence why # this project does not use Make or CMake. $cc -o $out ${src[@]} ${cflags[@]} ${ldflags[@]}