This repository has been archived on 2026-03-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
v2/build.c

50 lines
846 B
C
Raw Normal View History

2026-02-05 09:43:35 +11:00
#if 0
2026-02-05 19:14:31 +11:00
set -e
2026-02-05 09:43:35 +11:00
if [[ ! -v OUTPUT ]]; then
OUTPUT=solstice
fi
2026-02-05 19:14:31 +11:00
if [[ ! -v CFLAGS ]]; then
2026-02-15 14:55:02 +11:00
CFLAGS="-O3 -Wall -Wextra -pedantic"
2026-02-05 19:14:31 +11:00
fi
2026-02-15 14:55:02 +11:00
gcc "$0" -o "$OUTPUT" $CFLAGS
2026-02-05 09:43:35 +11:00
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")
2026-02-05 08:34:16 +11:00
// -- LEXER --
#include "src/lexer/SolsType.c"
2026-02-05 19:14:31 +11:00
#include "src/lexer/SolsToken.c"
#include "src/lexer/SolsLiteral.c"
2026-02-05 08:34:16 +11:00
#include "src/lexer/lexer.c"
// -- PARSER --
2026-02-21 17:01:48 +11:00
#include "src/parser/SolsNode.c"
2026-02-05 08:34:16 +11:00
// -- CODEGEN --
// -- MAIN --
#include "src/main.c"