51 lines
960 B
C
Executable File
51 lines
960 B
C
Executable File
#if 0
|
|
|
|
set -e
|
|
|
|
if [[ ! -v OUTPUT ]]; then
|
|
OUTPUT=solstice
|
|
fi
|
|
|
|
if [[ ! -v CFLAGS ]]; then
|
|
CFLAGS="-O3 -Wall -Wextra -pedantic -ggdb"
|
|
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/SolsScope.c"
|
|
#include "src/codegen/codegen.c"
|
|
|
|
// -- MAIN --
|
|
#include "src/main.c"
|