-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (27 loc) · 826 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
C= g++
FLAGS =--std=c++11 -W -Wall
simulator: simulator.o instruction.o memory.o
mkdir -p bin
$(C) $(FLAGS) bin/Simulator.o bin/instruction.o bin/memory.o -o bin/mips_simulator
chmod u+x bin/mips_simulator
parser:
cd ./mips-parser && make
cd ..
testbench: parser
mkdir -p bin
mkdir -p test/temp
cp tb/mips_testbench bin/
chmod u+x bin/mips_testbench
simulator.o: src/Simulator.cpp
$(C) $(FLAGS) -c src/Simulator.cpp -o bin/Simulator.o
instruction.o: src/instruction.cpp src/instruction.hpp
$(C) $(FLAGS) -c src/instruction.cpp -o bin/instruction.o
memory.o: src/memory.cpp src/memory.hpp
$(C) $(FLAGS) -c src/memory.cpp -o bin/memory.o
clean:
rm -f bin/mips_simulator
rm -f bin/mips_testbench
rm -f bin/*.o
rm -f test/temp/*.bin
rm -f test/temp/binaries
rm -f mips-parser/bin/parser