2014-12-24 09:17:57 -06:00
OBJS += backends / smt2 / smt2 . o
2015-10-13 17:37:41 -05:00
ifneq ( $ ( CONFIG ), mxe )
ifneq ( $ ( CONFIG ), emcc )
2019-03-12 16:55:47 -05:00
# MSYS targets support yosys-smtbmc, but require a launcher script
ifeq ( $ ( CONFIG ), $ ( filter $ ( CONFIG ), msys2 msys2 - 64 ))
2020-04-10 03:38:40 -05:00
TARGETS += $ ( PROGRAM_PREFIX ) yosys - smtbmc . exe $ ( PROGRAM_PREFIX ) yosys - smtbmc - script . py
2019-03-12 16:55:47 -05:00
# 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 )
2020-04-10 03:38:40 -05:00
$ ( PROGRAM_PREFIX ) 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/$(PROGRAM_PREFIX)yosys/python3"]]|;' \
2019-03-12 16:55:47 -05:00
- e " s|#!/usr/bin/env python3|#! $ (PYTHON)| " < $ < > $ @
2020-04-10 03:38:40 -05:00
$ ( PROGRAM_PREFIX ) yosys - smtbmc . exe : misc / launcher . c $ ( PROGRAM_PREFIX ) yosys - smtbmc - script . py
2019-09-08 02:47:09 -05:00
$ ( P ) $ ( CXX ) - DGUI = 0 - O - s - o $ @ $ <
2019-03-12 16:55:47 -05:00
# Other targets
else
2020-04-10 03:38:40 -05:00
TARGETS += $ ( PROGRAM_PREFIX ) yosys - smtbmc
2015-10-13 17:37:41 -05:00
2020-04-10 03:38:40 -05:00
$ ( PROGRAM_PREFIX ) 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/$(PROGRAM_PREFIX)yosys/python3"]]|;' < $ < > $ @. new
2015-10-13 18:27:55 -05:00
$ ( Q ) chmod + x $ @. new
$ ( Q ) mv $ @. new $ @
2019-03-12 16:55:47 -05:00
endif
2015-10-13 17:37:41 -05:00
$ ( eval $ ( call add_share_file , share / python3 , backends / smt2 / smtio . py ))
endif
endif