6 # On Windows, manually setting absolute path to Python binary may be required
7 # for launcher executable to work. From MSYS2, this can be done using the
8 # following command: "which python3 | cygpath -w -m -f -".
9 ifeq ($(OS
), Windows_NT
)
10 PYTHON
= $(shell cygpath
-w
-m
$(PREFIX
)/bin
/python3
)
13 .PHONY
: help
install ci
test html
clean
17 @echo
"sudo make install"
18 @echo
" build and install SymbiYosys (sby)"
21 @echo
" build documentation in docs/build/html/"
24 @echo
" run tests, skipping tests with missing dependencies"
27 @echo
" run all tests, failing tests with missing dependencies"
28 @echo
" note: this requires a full Tabby CAD Suite or OSS CAD Suite install"
35 mkdir
-p
$(DESTDIR
)$(PREFIX
)/bin
36 mkdir
-p
$(DESTDIR
)$(PREFIX
)/share
/yosys
/python3
37 cp sbysrc
/sby_
*.py
$(DESTDIR
)$(PREFIX
)/share
/yosys
/python3
/
38 sed
-e
's|##yosys-program-prefix##|"'$(PROGRAM_PREFIX
)'"|' < sbysrc
/sby_core.py
> $(DESTDIR
)$(PREFIX
)/share
/yosys
/python3
/sby_core.py
39 ifeq ($(OS
), Windows_NT
)
40 sed
-e
's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' \
41 -e
"s|#!/usr/bin/env python3|#!$(PYTHON)|" < sbysrc
/sby.py
> $(DESTDIR
)$(PREFIX
)/bin
/sby-script.py
42 gcc
-DGUI
=0 -O
-s
-o
$(DESTDIR
)$(PREFIX
)/bin
/sby.exe extern
/launcher.c
44 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
45 chmod
+x
$(DESTDIR
)$(PREFIX
)/bin
/sby
48 .PHONY
: check_cad_suite run_ci
55 if yosys
-qp
'read -verific' 2> /dev
/null
; then set
-x
; \
56 YOSYS_NOVERIFIC
=1 $(MAKE
) run_ci
; \
60 @if
! which tabbypip
>/dev
/null
2>&1; then \
61 echo
"'make ci' requries the Tabby CAD Suite or the OSS CAD Suite"; \
62 echo
"try 'make test' instead or run 'make run_ci' to proceed anyway."; \
67 cd sbysrc
&& python3 sby.py
-f demo1.sby
70 cd sbysrc
&& python3 sby.py
-f demo2.sby
73 cd sbysrc
&& python3 sby.py
-f demo3.sby
83 rm -rf docs
/build sbysrc
/sby sbysrc
/__pycache__