From 957c64c7b8b5e98d8a03dd84c7e27e7991fb9dbc Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Mon, 6 Apr 2026 17:04:05 -0400 Subject: Initial commit --- build.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 build.sh (limited to 'build.sh') 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[@]} -- cgit v1.3-2-g0d8e