1
0
mirror of synced 2026-05-23 21:51:52 +00:00
Files
YosysHQ.yosys/docs/source/code_examples/extensions/Makefile
Catherine 5f1d2297aa Migrate build system to CMake
See #5895 for details.

This commit does not include CI or documentation changes.
2026-05-19 14:37:53 +00:00

31 lines
863 B
Makefile

PROGRAM_PREFIX :=
YOSYS ?= ../../../../$(PROGRAM_PREFIX)yosys
.PHONY: all dots examples
all: dots examples
dots: test1.dot my_cmd.so
examples: test0.log test1.log test2.log my_cmd.so
my_cmd.so: my_cmd.cc
$(YOSYS)-config --exec --cxx --cxxflags --ldflags -o my_cmd.so -shared my_cmd.cc --ldlibs
test0.log: my_cmd.so
$(YOSYS) -QTl test0.log_new -m ./my_cmd.so -p 'my_cmd foo bar' -f verilog absval_ref.v
mv test0.log_new test0.log
test1.log: my_cmd.so
$(YOSYS) -QTl test1.log_new -m ./my_cmd.so -p 'clean; test1; dump' -f verilog absval_ref.v
mv test1.log_new test1.log
test1.dot: my_cmd.so
$(YOSYS) -m ./my_cmd.so -p 'test1; show -format dot -prefix test1'
test2.log: my_cmd.so
$(YOSYS) -QTl test2.log_new -m ./my_cmd.so -p 'hierarchy -top test; test2' -f verilog sigmap_test.v
mv test2.log_new test2.log
.PHONY: clean
clean:
rm -f *.d *.so *.dot