diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..8b7908e --- /dev/null +++ b/build.sh @@ -0,0 +1,20 @@ +#! /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[@]} |
