2016-06-22 11:42:04 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-11-02 20:56:25 -07:00
|
|
|
# Cause the script to exit if a single command fails.
|
|
|
|
set -e
|
|
|
|
|
2016-06-22 11:42:04 -07:00
|
|
|
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
|
|
|
|
2016-06-25 14:02:33 -07:00
|
|
|
# Determine how many parallel jobs to use for make based on the number of cores
|
|
|
|
unamestr="$(uname)"
|
|
|
|
if [[ "$unamestr" == "Linux" ]]; then
|
|
|
|
PARALLEL=$(nproc)
|
|
|
|
elif [[ "$unamestr" == "Darwin" ]]; then
|
|
|
|
PARALLEL=$(sysctl -n hw.ncpu)
|
|
|
|
else
|
|
|
|
echo "Unrecognized platform."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-01-17 16:56:40 -08:00
|
|
|
pushd "$ROOT_DIR/src/common/thirdparty/"
|
|
|
|
bash build-redis.sh
|
2016-10-25 22:39:21 -07:00
|
|
|
popd
|
|
|
|
|
2017-01-17 16:56:40 -08:00
|
|
|
bash "$ROOT_DIR/src/numbuf/thirdparty/download_thirdparty.sh"
|
|
|
|
bash "$ROOT_DIR/src/numbuf/thirdparty/build_thirdparty.sh"
|
2016-11-18 19:57:51 -08:00
|
|
|
|
2017-01-17 16:56:40 -08:00
|
|
|
# Now build everything.
|
|
|
|
pushd "$ROOT_DIR/python/core"
|
|
|
|
cmake ../..
|
|
|
|
make clean
|
2016-11-18 19:57:51 -08:00
|
|
|
make
|
|
|
|
popd
|