detect freebsd, build for armv7, configure general build for unknown platforms

This commit is contained in:
pigeons 2017-01-27 09:10:08 -08:00
parent 4eedef048d
commit 7b94a47350
2 changed files with 18 additions and 4 deletions

View file

@ -105,7 +105,16 @@ elif [ "$platform" == "linux32" ]; then
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../.. cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi fi
## LINUX other (arm7 for example) ## LINUX ARMv7
elif [ "$platform" == "linuxarmv7" ]; then
echo "Configuring build for Linux armv7"
if [ "$STATIC" == true ]; then
cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
## LINUX other
elif [ "$platform" == "linux" ]; then elif [ "$platform" == "linux" ]; then
echo "Configuring build for Linux general" echo "Configuring build for Linux general"
if [ "$STATIC" == true ]; then if [ "$STATIC" == true ]; then
@ -130,9 +139,12 @@ elif [ "$platform" == "mingw32" ]; then
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D Boost_DEBUG=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="i686" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" ../.. cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D Boost_DEBUG=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="i686" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" ../..
make_exec="mingw32-make" make_exec="mingw32-make"
else else
echo "Unsupported platform: $platform" echo "Unknown platform, configuring general build"
popd if [ "$STATIC" == true ]; then
exit 1 cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
fi fi

View file

@ -5,6 +5,8 @@ function get_platform {
local platform="unknown" local platform="unknown"
if [ "$(uname)" == "Darwin" ]; then if [ "$(uname)" == "Darwin" ]; then
platform="darwin" platform="darwin"
elif [ "$(uname)" == "FreeBSD" ]; then
platform="freebsd"
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
if [ "$(expr substr $(uname -m) 1 6)" == "x86_64" ]; then if [ "$(expr substr $(uname -m) 1 6)" == "x86_64" ]; then
platform="linux64" platform="linux64"