aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-02-10 22:24:11 +0100
committerTristan Gingold <tgingold@free.fr>2017-02-10 22:24:11 +0100
commit3c41ad5479be9991c2e30351a973b9e078b0e716 (patch)
tree8054c9d8ad298e9df6df22e0659f271c4dcf75bb /Makefile
parentd7437256f54daddece9fc39b506050080762f858 (diff)
downloadghdl-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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 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