5 # On Windows, manually setting absolute path to Python binary may be required
6 # for launcher executable to work. From MSYS2, this can be done using the
7 # following command: "which python3 | cygpath -w -m -f -".
8 ifeq ($(OS
), Windows_NT
)
9 PYTHON
= $(shell cygpath
-w
-m
$(PREFIX
)/bin
/python3
)
14 @echo
"sudo make install"
15 @echo
" build and install SymbiYosys (sby)"
18 @echo
" build documentation in docs/build/html/"
25 mkdir
-p
$(DESTDIR
)$(PREFIX
)/bin
26 mkdir
-p
$(DESTDIR
)$(PREFIX
)/share
/yosys
/python3
27 cp sbysrc
/sby_
*.py
$(DESTDIR
)$(PREFIX
)/share
/yosys
/python3
/
28 ifeq ($(OS
), Windows_NT
)
29 sed
-e
's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' \
30 -e
"s|#!/usr/bin/env python3|#!$(PYTHON)|" < sbysrc
/sby.py
> $(DESTDIR
)$(PREFIX
)/bin
/sby-script.py
31 gcc
-DGUI
=0 -O
-s
-o
$(DESTDIR
)$(PREFIX
)/bin
/sby.exe extern
/launcher.c
33 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
34 chmod
+x
$(DESTDIR
)$(PREFIX
)/bin
/sby
42 rm -rf docs
/build sbysrc
/sby sbysrc
/__pycache__