diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-02-10 22:24:11 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-02-10 22:24:11 +0100 |
commit | 3c41ad5479be9991c2e30351a973b9e078b0e716 (patch) | |
tree | 8054c9d8ad298e9df6df22e0659f271c4dcf75bb | |
parent | d7437256f54daddece9fc39b506050080762f858 (diff) | |
download | ghdl-yosys-plugin-3c41ad5479be9991c2e30351a973b9e078b0e716.tar.gz ghdl-yosys-plugin-3c41ad5479be9991c2e30351a973b9e078b0e716.tar.bz2 ghdl-yosys-plugin-3c41ad5479be9991c2e30351a973b9e078b0e716.zip |
Add Makefile to build ghdl as a yosys module.
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | README.md | 24 |
2 files changed, 33 insertions, 2 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6acc130 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +# Build ghdl module for yosys + +# Prefix where ghdl has been installed +GHDL_PREFIX= + +ifeq ($(GHDL_PREFIX),) +$(error GHDL_PREFIX not defined) +endif + +ghdl.so: ghdl/ghdl.cc + yosys-config --exec --cxx --cxxflags --ldflags -o $@ -shared $< -DYOSYS_ENABLE_GHDL -I$(GHDL_PREFIX)/include $(GHDL_PREFIX)/lib/libghdlsynth.so -Wl,-rpath,$(GHDL_PREFIX)/lib --ldlibs @@ -3,9 +3,29 @@ VHDL synthesis (based on ghdl) This is awfully experimental and work in progress! -## How to build +## How to build as a module -FIXME: should provide an easy way to build as a module! +Get and install yosys. + +Get ghdl from github, +build and install +build and install libghdlsynth.so: +```sh +$ make libghdlsynth.so +$ make install.libghdlsynth.shared +``` + +From ghdlsynth-beta: + +make GHDL_PREFIX=prefix-used-to-configure-ghdl + +This generates ghdl.so, which can be used directly: + +```sh +$ yosys -m ghdl.so +``` + +## How to build (not recommended) Get ghdl from github, build and install |