-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
42 lines (35 loc) · 1.11 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
y.tab.c: main.y
yacc -d main.y
# yacc -d -Wcounterexamples main.y
lex.yy.c: y.tab.c main.l
lex main.l
build: lex.yy.c y.tab.c
gcc -w -g lex.yy.c y.tab.c -o main
run: clean build
./main
decleration: build
./main < ./test/decleration.c > ./test/out/decleration.out
operations: build
./main < ./test/operations.c > ./test/out/operations.out
conditions: build
./main < ./test/conditions.c > ./test/out/conditions.out
loops: build
./main < ./test/loops.c > ./test/out/loops.out
functions: build
./main < ./test/functions.c > ./test/out/functions.out
enum: build
./main < ./test/enum.c > ./test/out/enum.out
mixed: build
./main < ./test/mixed.c > ./test/out/mixed.out
custom: build
./main < ./test/custom.c > ./test/out/custom.out
quads: build
./main < ./test/quads.c > ./test/out/quads.out
const_if: build
./main < ./test/const_if.c > ./test/out/const_if.out
conversions: build
./main < ./test/conversions.c > ./test/out/conversions.out
testAll: decleration operations conditions loops functions enum const_if conversions
echo "All tests passed"
clean:
rm -rf lex.yy.c y.tab.c y.tab.h main main.dSYM ./test/out/*.out