diff options
author | William D. Jones <thor0505@comcast.net> | 2019-03-12 17:55:47 -0400 |
---|---|---|
committer | William D. Jones <thor0505@comcast.net> | 2019-03-13 13:49:16 -0400 |
commit | ff15cf9b1f8208d8c6e22beb9aebedc8bdae213f (patch) | |
tree | 5630c4086ef42913d6ce0fb8e37207898658ccc0 /backends/smt2 | |
parent | ef48b62cb1206a3b72c00735fe817683ccf0f005 (diff) | |
download | yosys-ff15cf9b1f8208d8c6e22beb9aebedc8bdae213f.tar.gz yosys-ff15cf9b1f8208d8c6e22beb9aebedc8bdae213f.tar.bz2 yosys-ff15cf9b1f8208d8c6e22beb9aebedc8bdae213f.zip |
Install launcher executable when running yosys-smtbmc on Windows.
Signed-off-by: William D. Jones <thor0505@comcast.net>
Diffstat (limited to 'backends/smt2')
-rw-r--r-- | backends/smt2/Makefile.inc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/backends/smt2/Makefile.inc b/backends/smt2/Makefile.inc index dce82f01a..92941d4cf 100644 --- a/backends/smt2/Makefile.inc +++ b/backends/smt2/Makefile.inc @@ -3,14 +3,30 @@ OBJS += backends/smt2/smt2.o ifneq ($(CONFIG),mxe) ifneq ($(CONFIG),emcc) + +# MSYS targets support yosys-smtbmc, but require a launcher script +ifeq ($(CONFIG),$(filter $(CONFIG),msys2 msys2-64)) +TARGETS += yosys-smtbmc.exe yosys-smtbmc-script.py +# Needed to find the Python interpreter for yosys-smtbmc scripts. +# Override if necessary, it is only used for msys2 targets. +PYTHON := $(shell cygpath -w -m $(PREFIX)/bin/python3) + +yosys-smtbmc-script.py: backends/smt2/smtbmc.py + $(P) sed -e 's|##yosys-sys-path##|sys.path += [os.path.dirname(os.path.realpath(__file__)) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' \ + -e "s|#!/usr/bin/env python3|#!$(PYTHON)|" < $< > $@ + +yosys-smtbmc.exe: misc/launcher.c yosys-smtbmc-script.py + $(P) gcc -DGUI=0 -O -s -o $@ $< +# Other targets +else TARGETS += yosys-smtbmc yosys-smtbmc: backends/smt2/smtbmc.py $(P) sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(os.path.realpath(__file__)) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < $< > $@.new $(Q) chmod +x $@.new $(Q) mv $@.new $@ +endif $(eval $(call add_share_file,share/python3,backends/smt2/smtio.py)) endif endif - |