2 OBJS += backends/smt2/smt2.o
7 # MSYS targets support yosys-smtbmc, but require a launcher script
8 ifeq ($(CONFIG),$(filter $(CONFIG),msys2 msys2-64))
9 TARGETS += $(PROGRAM_PREFIX)yosys-smtbmc.exe $(PROGRAM_PREFIX)yosys-smtbmc-script.py
10 # Needed to find the Python interpreter for yosys-smtbmc scripts.
11 # Override if necessary, it is only used for msys2 targets.
12 PYTHON := $(shell cygpath -w -m $(PREFIX)/bin/python3)
14 $(PROGRAM_PREFIX)yosys-smtbmc-script.py: backends/smt2/smtbmc.py
15 $(P) sed -e 's|##yosys-sys-path##|sys.path += [os.path.dirname(os.path.realpath(__file__)) + p for p in ["/share/python3", "/../share/$(PROGRAM_PREFIX)yosys/python3"]]|;' \
16 -e "s|#!/usr/bin/env python3|#!$(PYTHON)|" < $< > $@
18 $(PROGRAM_PREFIX)yosys-smtbmc.exe: misc/launcher.c $(PROGRAM_PREFIX)yosys-smtbmc-script.py
19 $(P) $(CXX) -DGUI=0 -O -s -o $@ $<
22 TARGETS += $(PROGRAM_PREFIX)yosys-smtbmc
24 $(PROGRAM_PREFIX)yosys-smtbmc: backends/smt2/smtbmc.py
25 $(P) sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(os.path.realpath(__file__)) + p for p in ["/share/python3", "/../share/$(PROGRAM_PREFIX)yosys/python3"]]|;' < $< > $@.new
30 $(eval $(call add_share_file,share/python3,backends/smt2/smtio.py))