summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorjjsuperpower <jjs29356@gmail.com>2022-09-05 20:10:16 -0500
committerjjsuperpower <jjs29356@gmail.com>2022-09-05 20:10:16 -0500
commitcb06c203a8e9f57d0ff61bf55007946b4eb542ef (patch)
tree9167a1f99edebdc4c9c31850f800435a70a77f6c /Makefile
parent63626f2f6fc7e8912a349f120e37998cd1a05554 (diff)
honestly i don't know what I did
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 27 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 4586ff3..1279687 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,38 @@
+ROOT_DIR := $(shell pwd)
+HDL_FOLDER := ./hdl
+PYTHONPATH := $(ROOT_DIR)
-HDL_FOLDER = ./hdl
-HDL = $(wildcard $(HDL_FOLDER)/*.py)
+GEN_VERILOG := $(HDL_FOLDER)/gen_verilog
+GEN_CXXRTL := $(HDL_FOLDER)/gen_cxxrtl
+GEN_VCD := $(HDL_FOLDER)/gen_vcd
+
+HDL := $(wildcard $(HDL_FOLDER)/**/*.py)
+
+all: test
sim: $(HDL)
- python3 $< sim
+ echo 'Deprecated, FU'
+# cude but simple, and works...
cc: $(HDL)
- python3 $< cc $(basename $< .py)
+ export PYTHONPATH=$(PYTHONPATH)
+ for file in $(HDL); do \
+ python3 $$file cc; \
+ done
-v: $(HDL)
- python3 $< v
+# cude but simple, and works...
+v:
+ export PYTHONPATH=$(PYTHONPATH)
+ for file in $(HDL); do \
+ python3 $$file v; \
+ done
test:
- py.test --disable-pytest-warnings -v $(HDL)
+ export PYTHONPATH=$(PYTHONPATH); py.test -v $(HDL)
-test-w:
- py.test -v $(HDL)
+# disable pytest warnings
+test-nw:
+ export PYTHONPATH=$(PYTHONPATH); py.test --disable-pytest-warnings -v $(HDL)
clean:
- $(RM) -rf $(HDL_FOLDER)/*.cc $(HDL_FOLDER)/*.v $(HDL_FOLDER)/*.vcd $(HDL_FOLDER)/*.pyc $(HDL_FOLDER)/*.out $(HDL_FOLDER)/*.bak \ No newline at end of file
+ $(RM) $(GEN_VERILOG)/*.v $(GEN_CXXRTL)/*.cc $(GEN_VCD)/*.vcd \ No newline at end of file