aboutsummaryrefslogtreecommitdiff
path: root/gen/source.mk
diff options
context:
space:
mode:
Diffstat (limited to 'gen/source.mk')
-rw-r--r--gen/source.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/gen/source.mk b/gen/source.mk
new file mode 100644
index 0000000..55fe692
--- /dev/null
+++ b/gen/source.mk
@@ -0,0 +1,9 @@
+gen/gen_parser.c: src/parser.y gen/gen_lexer.inc
+ bison -Wcounterexamples -o gen/gen_parser.c src/parser.y
+
+gen/gen_lexer.inc: src/lexer.l
+ flex -o gen/gen_lexer.inc src/lexer.l
+
+build/gen/parser.o: gen/gen_parser.c
+ mkdir -p build/gen
+ $(COMPILE_FWD) $(SKIP_ANALYZER) -c gen/gen_parser.c -o build/gen/parser.o