From cb06c203a8e9f57d0ff61bf55007946b4eb542ef Mon Sep 17 00:00:00 2001 From: jjsuperpower Date: Mon, 5 Sep 2022 20:10:16 -0500 Subject: honestly i don't know what I did --- Makefile | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3