#!/bin/bash check_command_dependency() { echo -n "checking $1... " if command -v $1 >/dev/null 2>&1; then echo "found" else echo "missing" missing="$1 " fi } check_library_dependency() { echo -n "checking $1... " if ldconfig -p | grep -q $1; then echo "found" else if [[ ":$LD_LIBRARY_PATH:" == *":$LIBRARY_NAME:"* ]]; then echo "found" else echo "missing" missing="$1 " fi fi } echo Setting up local user ACT installation source configure_environment.sh # checking dependencies check_command_dependency git check_command_dependency cmake check_command_dependency g++ check_command_dependency gcc check_command_dependency m4 check_library_dependency zlib check_library_dependency libedit if [ -z ${missing+x} ]; then echo "All dependencies found" else echo Missing dependencies $missing exit 1 fi mkdir -p $ACT_HOME here=$(pwd) srcfolder=$here/src echo Building core library git clone https://github.com/asyncvlsi/act.git $srcfolder/act cd $srcfolder/act export VLSI_TOOLS_SRC=$srcfolder/act ./configure $ACT_HOME ./build make install make runtest cd $here echo Building stdlib git clone https://github.com/asyncvlsi/stdlib.git $srcfolder/stdlib cd $srcfolder/stdlib make install cd $here echo Building annotation library git clone https://github.com/asyncvlsi/annotate.git $srcfolder/annotate cd $srcfolder/annotate make install_inc make depend make make install cd $here echo Building actsim git clone https://github.com/TheBitFighter/actsim/ -b set_rework --recursive $srcfolder/actsim cd $srcfolder/actsim ./configure ./build.sh cd $here echo Setting up cluster agent git clone https://git.yeet.space/fabian/actsim-cluster-agent.git -b lib-merged --recursive $srcfolder/actsim-cluster-agent mkdir -p $srcfolder/actsim-cluster-agent/build cd $srcfolder/actsim-cluster-agent/build cmake .. make -j$(nproc) make install cd $here