3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-06 09:00:54 +00:00
yosys/docs/source/code_examples/stubnets/Makefile
Krystine Sherwin e1931596ae
CMake: Add wrapper for test-docs
Also skip calling `tail` on stubnets log outputs.

Fix auxprog prefixes

i.e. if we've set `YOSYS_PROGRAM_PREFIX=why`, we shouldn't be trying to call `build/yosys` when building docs (because if we've done a clean build it doesn't exist).
I suspect this also affects tests, but I was working on docs when I noticed it.
2026-06-04 20:35:51 +12:00

20 lines
606 B
Makefile

include ../../../common.mk
.PHONY: all dots examples
all: dots examples
dots:
examples: test
.PHONY: test
test: stubnets.so
@$(YOSYS) -ql test1.log -m ./stubnets.so test.v -p "stubnets" >/dev/null 2>&1
@$(YOSYS) -ql test2.log -m ./stubnets.so test.v -p "opt; stubnets" >/dev/null 2>&1
@$(YOSYS) -ql test3.log -m ./stubnets.so test.v -p "techmap; opt; stubnets -report_bits" >/dev/null 2>&1
stubnets.so: stubnets.cc
@$(YOSYS_CONFIG) --exec --cxx --cxxflags --ldflags -o $@ -shared $^ --ldlibs >/dev/null 2>&1
.PHONY: clean
clean:
@rm -f test1.log test2.log test3.log
@rm -f stubnets.so stubnets.d