From 6b730e777970cab7e6f1cd5925f7b1c47a05e47f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 17 Jan 2018 14:35:46 +0100 Subject: [PATCH] Add DESTDIR and PREFIX to Makefile --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 48f4647..2ed7e67 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ +DESTDIR = +PREFIX = /usr/local + help: @echo "" @echo "sudo make install" @@ -12,9 +15,9 @@ help: @echo "" install: - cp sbysrc/sby_*.py /usr/local/share/yosys/python3/ - sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < sbysrc/sby.py > /usr/local/bin/sby - chmod +x /usr/local/bin/sby + cp sbysrc/sby_*.py $(DESTDIR)$(PREFIX)/share/yosys/python3/ + sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < sbysrc/sby.py > $(DESTDIR)$(PREFIX)/bin/sby + chmod +x $(DESTDIR)$(PREFIX)/bin/sby html: make -C docs html -- 2.30.2