Overriding variables used in yosys-plugins Makefile
Resolving rebase conflicts
This commit is contained in:
parent
120ffeacf3
commit
9992880f53
|
@ -233,24 +233,34 @@ add_custom_target(
|
||||||
yosys ALL
|
yosys ALL
|
||||||
COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install
|
COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install
|
||||||
COMMAND $(MAKE) config-gcc
|
COMMAND $(MAKE) config-gcc
|
||||||
COMMAND $(MAKE) install PREFIX=$ENV{OPENFPGA_PATH}/yosys/install
|
COMMAND $(MAKE) install PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys
|
||||||
COMMENT "Compile Yosys with given Makefile"
|
COMMENT "Compile Yosys with given Makefile: ${CMAKE_CURRENT_SOURCE_DIR}/yosys/install"
|
||||||
)
|
)
|
||||||
|
|
||||||
# yosys compilation ends
|
# yosys compilation ends
|
||||||
|
|
||||||
# yosys-plugins compilation starts
|
# yosys-plugins compilation starts
|
||||||
|
add_custom_target(
|
||||||
|
YosysVariables ALL ${CMAKE_COMMAND}
|
||||||
|
-D YOSYS_INSTALL=${CMAKE_CURRENT_SOURCE_DIR}/yosys/install
|
||||||
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/YosysVars.cmake
|
||||||
|
COMMENT "Getting Yosys variables to use in yosys-plugins build: ${YS_CXX}"
|
||||||
|
)
|
||||||
|
add_dependencies(YosysVariables yosys)
|
||||||
|
|
||||||
# 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-plugins ALL
|
yosys-plugins ALL
|
||||||
COMMAND $(MAKE)
|
COMMAND $(MAKE) CXX=${YS_CXX} CXXFLAGS=${YS_CXXFLAGS} LDFLAGS=${YS_LDFLAGS}
|
||||||
COMMAND $(MAKE) install
|
LDLIBS=${YS_LDLIBS} PLUGINS_DIR=${YS_DATA_DIR}/plugins DATA_DIR=${YS_DATA_DIR}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys-plugins
|
COMMAND $(MAKE) install CXX=${YS_CXX} CXXFLAGS=${YS_CXXFLAGS} LDFLAGS=${YS_LDFLAGS}
|
||||||
COMMENT "Compile Yosys-plugins with given Makefile"
|
LDLIBS=${YS_LDLIBS} PLUGINS_DIR=${YS_DATA_DIR}/plugins DATA_DIR=${YS_DATA_DIR}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys-plugins
|
||||||
|
COMMENT "Compile Yosys-plugins with given Makefile: ${YS_CXX}"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(yosys-plugins yosys)
|
#add_dependencies(yosys-plugins yosys ) #YosysVariables)
|
||||||
|
|
||||||
# yosys-plugins compilation ends
|
# yosys-plugins compilation ends
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${YOSYS_INSTALL}/bin/yosys-config --cxx
|
||||||
|
OUTPUT_VARIABLE ENV{YS_CXX}
|
||||||
|
)
|
||||||
|
message(STATUS "++++++ YS_CXX: $ENV{YS_CXX}")
|
||||||
|
message(STATUS "++++++ YOSYS_INSTALL: ${YOSYS_INSTALL}")
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${YOSYS_INSTALL}/bin/yosys-config --cxxflags
|
||||||
|
OUTPUT_VARIABLE YS_CXXFLAGS
|
||||||
|
)
|
||||||
|
message(STATUS "++++++ YS_CXXFLAGS: ${YS_CXXFLAGS}")
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${YOSYS_INSTALL}/bin/yosys-config --ldflags
|
||||||
|
OUTPUT_VARIABLE YS_LDFLAGS
|
||||||
|
)
|
||||||
|
message(STATUS "++++++ YS_LDFLAGS: ${YS_LDFLAGS}")
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${YOSYS_INSTALL}/bin/yosys-config --ldlibs
|
||||||
|
OUTPUT_VARIABLE YS_LDLIBS
|
||||||
|
)
|
||||||
|
message(STATUS "++++++ YS_LDLIBS: ${YS_LDLIBS}")
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${YOSYS_INSTALL}/bin/yosys-config --datdir
|
||||||
|
OUTPUT_VARIABLE YS_DATA_DIR
|
||||||
|
)
|
||||||
|
message(STATUS "++++++ YS_DATA_DIR: ${YS_DATA_DIR}")
|
||||||
|
|
|
@ -16,10 +16,6 @@ export OPENFPGA_SCRIPT_PATH="${OPENFPGA_PATH}/openfpga_flow/scripts"
|
||||||
export OPENFPGA_TASK_PATH="${OPENFPGA_PATH}/openfpga_flow/tasks"
|
export OPENFPGA_TASK_PATH="${OPENFPGA_PATH}/openfpga_flow/tasks"
|
||||||
if [ -z $PYTHON_EXEC ]; then export PYTHON_EXEC="python3"; fi
|
if [ -z $PYTHON_EXEC ]; then export PYTHON_EXEC="python3"; fi
|
||||||
|
|
||||||
# Add yosys bin folder in PATH, this is required by yosys-plugins
|
|
||||||
# to install plugins in yosys folder
|
|
||||||
export PATH="${OPENFPGA_PATH}/yosys/install/bin:${PATH}"
|
|
||||||
|
|
||||||
# This function checks the path and
|
# This function checks the path and
|
||||||
# raises warning if the command is not executing
|
# raises warning if the command is not executing
|
||||||
# inside current OpendFPGA folder
|
# inside current OpendFPGA folder
|
||||||
|
|
Loading…
Reference in New Issue