3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-06 01:24:10 +00:00
yosys/manual/PRESENTATION_Prog/Makefile
Xiretza 8b0ec3c3a2
Use in-tree include directory in manual build
This is basically the same issue as in tests/various/plugin.sh,
which uses yosys-config to compile a plugin. `yosys-config --cxxflags`
points to `$PREFIX/share/` (/usr/local/share by default), which might
not exist yet or might be out of date. Building directly from the
headers in ./share/ avoids this.
2020-05-30 11:21:40 +02:00

22 lines
661 B
Makefile

all: test0.log test1.log test2.log
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
test0.log: my_cmd.so
../../yosys -Ql test0.log_new -m ./my_cmd.so -p 'my_cmd foo bar' absval_ref.v
mv test0.log_new test0.log
test1.log: my_cmd.so
../../yosys -Ql test1.log_new -m ./my_cmd.so -p 'clean; test1; dump' absval_ref.v
mv test1.log_new test1.log
test2.log: my_cmd.so
../../yosys -Ql test2.log_new -m ./my_cmd.so -p 'test2' sigmap_test.v
mv test2.log_new test2.log