mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 09:55:20 +00:00
The Makefile assumes the compiler is called `gcc`, which isn't always true. In fact, if we're building on msys2 or msys2-64, the compiler is called `i686-w64-mingw32-g++` or `x86_64-w64-mingw32-g++`. Use the variable instead of hardcoding the name, to fix building on these systems. Signed-off-by: Sean Cross <sean@xobs.io>
33 lines
1.1 KiB
Makefile
33 lines
1.1 KiB
Makefile
|
|
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) $(CXX) -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
|