44 lines
677 B
Plaintext
Executable File
44 lines
677 B
Plaintext
Executable File
OS_UNAME=`uname`
|
|
if [[ "$OS_UNAME" != 'Linux' ]]; then
|
|
exit 0
|
|
fi
|
|
|
|
set -x
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
mkdir -p sdk/include
|
|
mkdir -p sdk/lib
|
|
|
|
LIB=libunwind
|
|
|
|
mkdir $LIB
|
|
pushd $LIB
|
|
|
|
git clone https://github.com/libunwind/libunwind --branch=v1.8.1 --depth 1
|
|
|
|
pushd libunwind
|
|
|
|
autoreconf -i
|
|
./configure --prefix=`pwd`/install --enable-static
|
|
make install
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
pushd sdk/include
|
|
rm libunwind
|
|
ln -fs ../../$LIB/libunwind/install/include libunwind
|
|
popd
|
|
|
|
pushd sdk/lib
|
|
for dir in */; do
|
|
pushd $dir
|
|
ln -s ../../../$LIB/libunwind/install/lib/*.a ./
|
|
popd
|
|
done
|
|
popd
|
|
|
|
ls -lha sdk/lib/*/libunwind*
|
|
ls -lha sdk/include/libunwind
|