fixed threading path and the os dir path.
This commit is contained in:
parent
49808a64ac
commit
e0cf86be4e
@ -2,10 +2,13 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
|
||||||
cd "$root_dir"
|
cd "${root_dir}"
|
||||||
|
|
||||||
os_dir=$(./platform/os.sh osdir)
|
os_dir=$(./platform/os.sh osdir)
|
||||||
|
|
||||||
|
#set the LD_LIBRARY_PATH for the linux clients.
|
||||||
|
export LD_LIBRARY_PATH="${root_dir}/libbitcoind/src/leveldb":"${os_dir}":$LD_LIBRARY_PATH
|
||||||
|
|
||||||
if test -e "${os_dir}/libbitcoind.so" || test -e "${os_dir}/libbitcoind.dylib"; then
|
if test -e "${os_dir}/libbitcoind.so" || test -e "${os_dir}/libbitcoind.dylib"; then
|
||||||
read -r -p 'libbitcoind already built. Rebuild? (Y/n): ' choice
|
read -r -p 'libbitcoind already built. Rebuild? (Y/n): ' choice
|
||||||
if test x"$choice" != x'y' -a x"$choice" != x'Y'; then
|
if test x"$choice" != x'y' -a x"$choice" != x'Y'; then
|
||||||
@ -59,9 +62,14 @@ make V=1
|
|||||||
|
|
||||||
echo 'Copying libbitcoind.{so|dylib} to its appropriate location.'
|
echo 'Copying libbitcoind.{so|dylib} to its appropriate location.'
|
||||||
if test -e "${os_dir}/libbitcoind.so"
|
if test -e "${os_dir}/libbitcoind.so"
|
||||||
mv src/libbitcoind.so "${os_dir}/libbitcoind.so"
|
mv src/libbitcoind.so "${os_dir}/libbitcoind.so.0.0.0"
|
||||||
|
cd "${os_dir}"
|
||||||
|
ln -s libbitcoind.so.0.0.0 libbitcoind.so.0
|
||||||
|
ln -s libbitcoind.so.0.0.0 libbitcoind.so
|
||||||
elif test -e "${os_dir}/libbitcoind.dylib"; then
|
elif test -e "${os_dir}/libbitcoind.dylib"; then
|
||||||
mv src/libbitcoind.dylib "${os_dir}/libbitcoind.dylib"
|
mv src/libbitcoind.dylib "${os_dir}/libbitcoind.0.dylib"
|
||||||
|
cd "${os_dir}"
|
||||||
|
ln -s libbitcoind.0.dylib libbitcoind.dylib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'Build finished successfully.'
|
echo 'Build finished successfully.'
|
||||||
|
|||||||
@ -27,8 +27,8 @@
|
|||||||
],
|
],
|
||||||
'libraries': [
|
'libraries': [
|
||||||
'-lboost_filesystem',
|
'-lboost_filesystem',
|
||||||
'-lboost_thread',
|
'<!(./platform/os.sh thread)',
|
||||||
'-lbitcoind'
|
'<!(./platform/os.sh lib)'
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,22 +2,11 @@
|
|||||||
|
|
||||||
exec 2> /dev/null
|
exec 2> /dev/null
|
||||||
|
|
||||||
btcdir() {
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
|
||||||
if test -d "$(pwd)/libbitcoind"; then
|
BITCOIN_DIR="${root_dir}/libbitcoind"
|
||||||
BITCOIN_DIR="$(pwd)/libbitcoind"
|
|
||||||
elif test -d "${HOME}/bitcoin"; then
|
|
||||||
BITCOIN_DIR="${HOME}/bitcoin"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if test x"$1" = x'btcdir'; then
|
|
||||||
btcdir
|
|
||||||
echo $BITCOIN_DIR
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
os=
|
os=
|
||||||
ext=so
|
ext=so
|
||||||
|
thread=-lboost_thread
|
||||||
|
|
||||||
if test -f /etc/centos-release \
|
if test -f /etc/centos-release \
|
||||||
|| grep -q 'CentOS' /etc/redhat-release \
|
|| grep -q 'CentOS' /etc/redhat-release \
|
||||||
@ -31,6 +20,7 @@ elif test -f /etc/redhat_release \
|
|||||||
elif uname -a | grep -q '^Darwin'; then
|
elif uname -a | grep -q '^Darwin'; then
|
||||||
os=osx
|
os=osx
|
||||||
ext=dylib
|
ext=dylib
|
||||||
|
thread=-lboost_thread-mt
|
||||||
elif test -f /etc/SuSE-release; then
|
elif test -f /etc/SuSE-release; then
|
||||||
os=suse
|
os=suse
|
||||||
elif test -f /etc/mandrake-release \
|
elif test -f /etc/mandrake-release \
|
||||||
@ -56,8 +46,9 @@ elif test -d /system && test -d /data/data; then
|
|||||||
os=android
|
os=android
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
os_dir=${root_dir}/platform/${os}
|
||||||
|
|
||||||
if test -z "$os" -o x"$os" = x'android' -o x"$os" = x'aix'; then
|
if test -z "$os" -o x"$os" = x'android' -o x"$os" = x'aix'; then
|
||||||
# Maybe someday...
|
|
||||||
if test "$os" = 'android' -o "$os" = 'aix'; then
|
if test "$os" = 'android' -o "$os" = 'aix'; then
|
||||||
echo 'Android or AIX detected!' >& 2
|
echo 'Android or AIX detected!' >& 2
|
||||||
fi
|
fi
|
||||||
@ -69,12 +60,16 @@ if test x"$1" = x'osdir'; then
|
|||||||
echo -n "$(pwd)/platform/${os}"
|
echo -n "$(pwd)/platform/${os}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -z "$1" -o x"$1" = x'thread'; then
|
||||||
|
echo -n "${thread}"
|
||||||
|
fi
|
||||||
|
|
||||||
if test -z "$1" -o x"$1" = x'lib'; then
|
if test -z "$1" -o x"$1" = x'lib'; then
|
||||||
btcdir
|
if test -e "${os_dir}/libbitcoind.${ext}"; then
|
||||||
if test -n "${BITCOIN_DIR}" -a -e "${BITCOIN_DIR}/src/.libs/libbitcoind.${ext}"; then
|
|
||||||
echo -n "${BITCOIN_DIR}/src/.libs/libbitcoind.${ext}"
|
|
||||||
else
|
|
||||||
echo -n "$(pwd)/platform/${os}/libbitcoind.${ext}"
|
echo -n "$(pwd)/platform/${os}/libbitcoind.${ext}"
|
||||||
|
else
|
||||||
|
echo -n "${BITCOIN_DIR}/src/.libs/libbitcoind.${ext}"
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user