-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (29 loc) · 1.19 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
43
44
45
46
47
48
49
50
Calculator: tokenizer.o infix2postfix.o code_generator.o virtual_machine.o
gcc -c ./src/calculator.c
gcc -o calculator calculator.o tokenizer.o infix2postfix.o code_generator.o virtual_machine.o
tokenizer.o:
gcc -c ./src/tokenizer.c
infix2postfix.o:
gcc -c ./src/infix2postfix.c
code_generator.o:
gcc -c ./src/code_generator.c
virtual_machine.o:
gcc -c ./src/virtual_machine.c
test: tokenizerTest.t infix2postfixTest.t codegenTest.t vmTest.t calculatorTest.t
prove ./tokenizerTest.t
prove ./infix2postfixTest.t
prove ./codegenTest.t
prove ./vmTest.t
prove ./calculatorTest.t
tokenizerTest.t: tokenizer.o
gcc -o tokenizerTest.t tokenizer.o ./src/tokenizerTest.c
infix2postfixTest.t: infix2postfix.o
gcc -o infix2postfixTest.t infix2postfix.o ./src/infix2postfixTest.c
codegenTest.t: code_generator.o
gcc -o codegenTest.t code_generator.o ./src/codegenTest.c
vmTest.t: virtual_machine.o
gcc -o vmTest.t virtual_machine.o ./src/virtual_machineTest.c
calculatorTest.t: tokenizer.o infix2postfix.o code_generator.o virtual_machine.o
gcc -o calculatorTest.t ./src/calculatorTest.c tokenizer.o infix2postfix.o code_generator.o virtual_machine.o
clean:
rm -f *.o *.t *.txt calculator