#if 0 set -e if [[ ! -v OUTPUT ]]; then OUTPUT=solstice fi if [[ ! -v CFLAGS ]]; then CFLAGS="-O3 -Wall -Wextra -pedantic" fi gcc "$0" -o "$OUTPUT" $CFLAGS -lgroundvm 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/SolsToken.c" #include "src/lexer/SolsLiteral.c" #include "src/lexer/lexer.c" // -- PARSER -- #include "src/parser/SolsNode.c" #include "src/parser/parser.c" // -- CODEGEN -- #include "src/codegen/codegen.c" // -- MAIN -- #include "src/main.c"