Migrate build system to CMake
See #5895 for details. This commit does not include CI or documentation changes.
This commit is contained in:
@@ -7,11 +7,8 @@ all: dots examples
|
||||
dots: test1.dot my_cmd.so
|
||||
examples: test0.log test1.log test2.log my_cmd.so
|
||||
|
||||
CXXFLAGS=$(shell $(YOSYS)-config --cxxflags)
|
||||
DATDIR=$(shell $(YOSYS)-config --datdir)
|
||||
|
||||
my_cmd.so: my_cmd.cc
|
||||
$(YOSYS)-config --exec --cxx $(subst $(DATDIR),../../../../share,$(CXXFLAGS)) --ldflags -o my_cmd.so -shared my_cmd.cc --ldlibs
|
||||
$(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
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
PROGRAM_PREFIX :=
|
||||
|
||||
YOSYS ?= ../../../../$(PROGRAM_PREFIX)yosys
|
||||
|
||||
.PHONY: all dots examples
|
||||
all: dots examples
|
||||
dots:
|
||||
@@ -5,13 +9,13 @@ examples:
|
||||
|
||||
.PHONY: test
|
||||
test: stubnets.so
|
||||
yosys -ql test1.log -m ./stubnets.so test.v -p "stubnets"
|
||||
yosys -ql test2.log -m ./stubnets.so test.v -p "opt; stubnets"
|
||||
yosys -ql test3.log -m ./stubnets.so test.v -p "techmap; opt; stubnets -report_bits"
|
||||
$(YOSYS) -ql test1.log -m ./stubnets.so test.v -p "stubnets"
|
||||
$(YOSYS) -ql test2.log -m ./stubnets.so test.v -p "opt; stubnets"
|
||||
$(YOSYS) -ql test3.log -m ./stubnets.so test.v -p "techmap; opt; stubnets -report_bits"
|
||||
tail test1.log test2.log test3.log
|
||||
|
||||
stubnets.so: stubnets.cc
|
||||
yosys-config --exec --cxx --cxxflags --ldflags -o $@ -shared $^ --ldlibs
|
||||
$(YOSYS)-config --exec --cxx --cxxflags --ldflags -o $@ -shared $^ --ldlibs
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||
Reference in New Issue
Block a user