-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (28 loc) · 953 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
.DEFAULT_GOAL := help
help:
@echo "Welcome to use Grayscale_Verilog_Converter!"
@echo "Usage: make requirements: install the required packages"
@echo " make image image=<path_to_image>: convert the grayscale image to verilog file"
@echo " make folder folder=<folder>: convert all the grayscale images in the folder to verilog files"
@echo " make test: convert all the grayscale images in the test folder to verilog files"
@echo " make clean: clean the build folder"
requirements:
pip install -r requirements.txt
image:
# create the build folder if not exist
if [ ! -d "build" ]; then mkdir build; fi
python3 src/main.py $(image)
folder:
if [ ! -d "build" ]; then mkdir build; fi
for file in $(folder)/*.png; do \
python3 src/main.py $$file; \
done
#phony test
.PHONY: test
test:
if [ ! -d "build" ]; then mkdir build; fi
for file in test/*.png; do \
make image image=$$file; \
done
clean:
rm -rf build/*