[script] now yosys is installed to the build directory

This commit is contained in:
tangxifan 2023-02-03 22:10:40 -08:00
parent 84f3dad78c
commit f38e8aefb3
1 changed files with 6 additions and 6 deletions

View File

@ -312,15 +312,15 @@ endif()
# we will check if yosys already exist. if not then build it # we will check if yosys already exist. if not then build it
if (OPENFPGA_WITH_YOSYS) if (OPENFPGA_WITH_YOSYS)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install/bin/yosys) if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/yosys/install/bin/yosys)
message(STATUS "Yosys pre-build exist so skipping it") message(STATUS "Yosys pre-build exist so skipping it")
else () else ()
# run makefile provided, we pass-on the options to the local make file # run makefile provided, we pass-on the options to the local make file
add_custom_target( add_custom_target(
yosys ALL yosys ALL
COMMAND $(MAKE) config-gcc COMMAND $(MAKE) config-gcc
COMMAND $(MAKE) install PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install COMMAND $(MAKE) install PREFIX=${CMAKE_CURRENT_BINARY_DIR}/yosys/install
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yosys
COMMENT "Compile Yosys with given Makefile" COMMENT "Compile Yosys with given Makefile"
) )
# yosys compilation ends # yosys compilation ends
@ -329,9 +329,9 @@ if (OPENFPGA_WITH_YOSYS)
if (OPENFPGA_WITH_YOSYS_PLUGIN) if (OPENFPGA_WITH_YOSYS_PLUGIN)
add_custom_target( add_custom_target(
yosys-plugins ALL yosys-plugins ALL
COMMAND $(MAKE) install_ql-qlf YOSYS_PATH=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install EXTRA_FLAGS="-DPASS_NAME=synth_ql" COMMAND $(MAKE) install_ql-qlf YOSYS_PATH=${CMAKE_CURRENT_BINARY_DIR}/yosys/install EXTRA_FLAGS="-DPASS_NAME=synth_ql"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys-plugins WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yosys-plugins
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install/bin/yosys DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/yosys/install/bin/yosys
COMMENT "Compile Yosys-plugins with given Makefile" COMMENT "Compile Yosys-plugins with given Makefile"
) )
add_dependencies(yosys-plugins yosys) add_dependencies(yosys-plugins yosys)