-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (57 loc) · 1.66 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
66
67
68
69
70
71
# Makefile, alternative to do.sh script using make command.
#
SCRIPT= ./do.sh
INIT= init
CLEAN= clean
ELA= ela
SIM_GUI= sim gui
SIM= sim
SYN= syn
SSH= shell
SSH_GUI= shell_gui
PUSH= push
USAGE= usage
# If the first argument is "push"...
ifeq (push,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "push"
PUSH_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(PUSH_ARGS):;@:)
endif
# RECIPE
help: ## Show this help.
@echo "Makefile help"
@echo "usage: make [OPTIONS]"
@echo
@echo "OPTIONS:"
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
@echo "For more details, run do.sh --help:"
all: ## Build all: init, ela, sim, syn
@${SCRIPT} ${INIT}
@${SCRIPT} ${ELA}
@${SCRIPT} ${SIM_GUI}
@${SCRIPT} ${SYN}
clean: ## clean repo
@${SCRIPT} ${CLEAN}
init: ## directory file initialization: creation of "do" files and "compile" files
@echo "File initialization..."
@${SCRIPT} ${INIT}
@echo "Done"
ela: ## Compile all vhdl, verilog and systemVerilog files in src/ and tb/ directories
@${SCRIPT} ${ELA}
sim: ## Simulate the design with modelsim, shell interface
@${SCRIPT} ${SIM}
sim_gui:## Simulate the design with modelsim, GUI
@${SCRIPT} ${SIM_GUI}
syn: ## Synthetize the design with design vision
@${SCRIPT} ${SYN}
push: ## Push files/directories to the server, you can specify the file/directory (e.g. make push file.txt)
@echo
@${SCRIPT} ${PUSH} ${PUSH_ARGS}
shell: ## SSH server connection
@echo
${SCRIPT} ${SSH}
shell_gui: ## SSH server connection
@echo
${SCRIPT} ${SSH_GUI}
.PHONY: help usage all ela sim sim_gui syn push shell shell_gui