From 4333c423057375e4a4d8e44ea2b09a96d93b0d93 Mon Sep 17 00:00:00 2001 From: Maxwell Jeffress Date: Thu, 5 Feb 2026 09:43:35 +1100 Subject: [PATCH] More comprehensive build.c --- build.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) mode change 100644 => 100755 build.c diff --git a/build.c b/build.c old mode 100644 new mode 100755 index 764a61b..e2c5549 --- a/build.c +++ b/build.c @@ -1,3 +1,33 @@ +#if 0 + +set -eou + +if [[ ! -v OUTPUT ]]; then + OUTPUT=solstice +fi + +gcc "$0" -o "$OUTPUT" + +if not [ $# -lt 1 ]; then + exec "./$OUTPUT" "$@" +fi + +exit + +#endif + +// Solstice unity build C file +// To build: ./build.c +// Options: +// ./build.c (args) +// Builds Solstice, and runs the outputted executable +// with the provided args. +// +// Use the following environment variables to change +// the behaviour of the program: +// OUTPUT: name of the outputted program (defaults +// to "solstice") + // -- LEXER -- #include "src/lexer/SolsType.c" #include "src/lexer/lexer.c"