-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
65 lines (54 loc) · 1.58 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
###################################################################
### Constants
###################################################################
# Text effects: normal, bold, underline
n=\e[0m
b=\e[1m
u=\e[4m
# Bold and green
g=\e[1;32m
# Bold and red
r=\e[1;31m
# Debug message
m=$g$uProjectDeep Makefile:$n
###################################################################
### Help Screen
###################################################################
default:
@echo -e "$mHELP SCREEN"
@echo -e ""
@echo -e "$bUSAGE:$n"
@echo -e "\tmake $uTARGET$n [$uVARIABLE$n]..."
@echo -e ""
@echo -e ""
@echo -e "$bTARGETS:$n"
@echo -e "\t$bsim$n"
@echo -e "\t compiles simulator in $bsim/$n directory and generates"
@echo -e "\t executable $bdeep_sim$n in $bsim/$n directory"
@echo -e ""
@echo -e "\t$bverilog$n"
@echo -e "\t compiles verilog code in $brtl/$n directory and generates"
@echo -e "\t executable $bsimv$n in $brtl/$n directory"
@echo -e "\t"
@echo -e "\t$bclean$n"
@echo -e "\t deletes temporary files and cleans all output files in "
@echo -e "\t $bsim/$n and $brtl/$n"
@echo -e "\t"
@exit 0
.PHONY: sim
sim:
@echo -e "$gCompiling software simulator: deep_sim$n"
$(MAKE) -C sim/
cp sim/deep_sim .
@echo -e "\n$bDone! Simulator can be found as: ./deep_sim$n\n"
.PHONY: rtl
verilog:
@echo -e "$gCompiling verilog rtl simulator: deep_sim$n"
$(MAKE) -C rtl/
@echo -e "\n$bDone! Simulator can be found as: ./simv$n\n"
clean:
@echo -e "$gCleaning all directries!$n"
rm -f *~
$(MAKE) -C sim/ clean
$(MAKE) -C rtl/ clean
@echo -e "\n$bDone!$n\n"