From: Benedikt Tutzer Date: Tue, 11 Dec 2018 07:42:57 +0000 (+0100) Subject: Added python-api to install X-Git-Tag: yosys-0.9~179^2~20 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ca9fa64f7438cc4238b9245defd72a242da0fe7;p=yosys.git Added python-api to install --- diff --git a/Makefile b/Makefile index e1d66e566..c1943758a 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ ENABLE_PROTOBUF := 0 # python wrappers ENABLE_PYTHON := 1 PYTHON_VERSION := 3.5 +PYTHON_DESTDIR := /usr/local/lib/python$(PYTHON_VERSION)/dist-packages # other configuration flags ENABLE_GPROF := 0 @@ -602,6 +603,11 @@ ifeq ($(ENABLE_LIBYOSYS),1) $(INSTALL_SUDO) cp libyosys.so $(DESTDIR)$(LIBDIR) $(INSTALL_SUDO) $(STRIP) -S $(DESTDIR)$(LIBDIR)/libyosys.so $(INSTALL_SUDO) ldconfig +ifeq ($(ENABLE_PYTHON),1) + $(INSTALL_SUDO) mkdir -p $(PYTHON_DESTDIR)/libyosys + $(INSTALL_SUDO) cp libyosys.so $(PYTHON_DESTDIR)/libyosys + $(INSTALL_SUDO) cp __init__.py $(PYTHON_DESTDIR)/libyosys +endif endif uninstall: @@ -609,6 +615,11 @@ uninstall: $(INSTALL_SUDO) rm -rvf $(DESTDIR)$(DATDIR) ifeq ($(ENABLE_LIBYOSYS),1) $(INSTALL_SUDO) rm -vf $(DESTDIR)$(LIBDIR)/libyosys.so +ifeq ($(ENABLE_PYTHON),1) + $(INSTALL_SUDO) rm -vf $(PYTHON_DESTDIR)/libyosys/libyosys.so + $(INSTALL_SUDO) rm -vf $(PYTHON_DESTDIR)/libyosys/__init__.py + $(INSTALL_SUDO) rmdir $(PYTHON_DESTDIR)/libyosys +endif endif update-manual: $(TARGETS) $(EXTRA_TARGETS)