Skip to content

Commit

Permalink
Adding yasm library
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianomg committed Aug 10, 2022
1 parent 7b1b42b commit 6a8c319
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
9 changes: 4 additions & 5 deletions libs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@ The folowing packages are required to install SPBench dependencies:

- build-essential
- cmake
- yasm
- python (tested on python3 and python2.7)

You can run the command bellow to install theses dependencies or ask a system admin.

``
sudo apt-get install -y build-essential cmake yasm python3
sudo apt-get install -y build-essential cmake python3
``

## Installation
For Lane Detection you first must install ffmpeg and then OpenCV.
For Lane Detection you first must install yasm -> ffmpeg -> OpenCV -> UPL.

For Bzip2 you only need to install the bzlib library.
For Bzip2 you need to install the bzlib -> UPL.

For Ferret, you must install GSL and JPEG
For Ferret, you must install GSL -> JPEG -> UPL

## ffmpeg

Expand Down
36 changes: 36 additions & 0 deletions libs/yasm/setup_yasm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
cd $THIS_DIR

FILE="yasm-1.3.0.tar.gz"

if [ ! -f "$FILE" ]; then
echo "Downloading $FILE..."
wget -c --read-timeout=5 --tries=10 https://gmap.pucrs.br/public_data/spbench/libs/yasm/$FILE
fi

LIB_DIR="yasm-1.3.0"

if [ -d "$LIB_DIR" ]; then
echo "Previous installation found."
echo "Do you want to delete and reinstall it? [yes/no]"
read ANSWER
re2='[Yy]es|YES|[Yy]'
if ! [[ $ANSWER =~ $re2 ]] ; then
echo "Installation cancelled!"
exit 1
fi
rm -rf $LIB_DIR
fi

tar -xf $FILE

cd $LIB_DIR
mkdir build
PREFIX="$PWD/build"
PATH="$PREFIX/bin:$PATH"
./configure --prefix=$PREFIX
make -j$(nproc)
make install
cd ..
7 changes: 7 additions & 0 deletions libs/yasm/setup_yasm_vars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"

YASM_HOME=$LIB_DIR/yasm-1.3.0/build
export PATH=${YASM_HOME}/bin:$PATH
export LD_LIBRARY_PATH=${YASM_HOME}/lib:${YASM_HOME}/include:$LD_LIBRARY_PATH

0 comments on commit 6a8c319

Please sign in to comment.