-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (40 loc) · 1.11 KB
/
Makefile
File metadata and controls
46 lines (40 loc) · 1.11 KB
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
SRC = src
FILE_IO = file_io
P_n_R = place_and_route
STRUCTS = structures
UI = ui
PYCACHE = __pycache__
.PHONY: run run_win help help_win clean clean_win
Make_help:
@echo "To run the tool, use parameters 'run' or 'run_win' for Linux and Windows"
@echo "executions respectively. Use parameter 'ARGS=' to pass arguments on the"
@echo "tool. Example: make run ARGS='-i input.txt'"
@echo
@echo "For additional help with the tool, use parameters 'help or 'help_win"
# Linux Run
run:
python3 ./$(SRC)/router.py ${ARGS}
# Linux Help
help:
python3 ./$(SRC)/router.py -h
# Windows Run
run_win:
python .\$(SRC)\router.py $(ARGS)
# Windows Help
help_win:
python .\$(SRC)\router.py -h
# Cleanups
# Cleanup for linux executions
clean:
rm -rf ./$(SRC)/$(PYCACHE)
rm -rf ./$(SRC)/$(FILE_IO)/$(PYCACHE)
rm -rf ./$(SRC)/$(P_n_R)/$(PYCACHE)
rm -rf ./$(SRC)/$(STRUCTS)/$(PYCACHE)
rm -rf ./$(SRC)/$(UI)/$(PYCACHE)
# Cleanup for windows executions
clean_win:
rd /s /q $(SRC)\$(PYCACHE)
rd /s /q $(SRC)\$(FILE_IO)\$(PYCACHE)
rd /s /q $(SRC)\$(P_n_R)\$(PYCACHE)
rd /s /q $(SRC)\$(STRUCTS)\$(PYCACHE)
rd /s /q $(SRC)\$(UI)\$(PYCACHE)