forked from Sh0g0-1758/scarlet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (28 loc) · 998 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.PHONY: build test clean
build:
@echo "Building scarlet..."
@mkdir -p build
@g++-13 -std=c++20 ./driver/driver.cc -o ./build/scarlet -I .
@echo "Done."
test: build
@echo "Running lexer-1 test"
@./test_compiler ./build/scarlet --chapter 1 --stage lex
@echo "Running parser-1 test"
@./test_compiler ./build/scarlet --chapter 1 --stage parse
@echo "Running Codegen-1 test"
@./test_compiler ./build/scarlet --chapter 1 --stage codegen
@echo "Running test all-1"
@./test_compiler ./build/scarlet --chapter 1
@echo "Running lexer-2 test"
@./test_compiler ./build/scarlet --chapter 2 --stage lex
@echo "Running parser-2 test"
@./test_compiler ./build/scarlet --chapter 2 --stage parse
@echo "Running scar-2 test"
@./test_compiler ./build/scarlet --chapter 2 --stage tacky
@echo "Running Codegen-2 test"
@./test_compiler ./build/scarlet --chapter 2 --stage codegen
@echo "Running test all-2"
@./test_compiler ./build/scarlet --chapter 2
clean:
@echo "Cleaning up..."
@rm -rf build