-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor cleanup of MinGW-related scripts
- Loading branch information
1 parent
68ea3f5
commit e1c94bd
Showing
7 changed files
with
38 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
if [ -z "$ARCH" ]; then | ||
ARCH=32 | ||
fi | ||
MINGW=mingw$ARCH | ||
|
||
if [ -z "$MSYSCON" ]; then | ||
MINGW_PATH=/opt/$MINGW | ||
|
||
DISTRO=$(lsb_release -si) | ||
|
||
if [ "$DISTRO" != "Ubuntu" ]; then | ||
echo "This script only supports Ubuntu" | ||
exit 1 | ||
fi | ||
|
||
TOOLCHAIN_NAME="Ubuntu-MinGW-W64-$ARCH" | ||
else | ||
MINGW_PATH=/$MINGW | ||
TOOLCHAIN_NAME="MSYS-$ARCH" | ||
fi | ||
|
||
export PATH=$MINGW_PATH/bin:$PATH | ||
|
||
if [ "$ARCH" == "32" ]; then | ||
export CFLAGS="-march=pentium4 -mtune=generic -mpreferred-stack-boundary=5 -mfpmath=sse" | ||
fi | ||
export CXXFLAGS="$CFLAGS" | ||
|
||
CMAKE_OPTS="-DCMAKE_PREFIX_PATH=$MINGW_PATH $CMAKE_OPTS" | ||
|
||
# shellcheck disable=SC2086 | ||
cmake "$DIR/.." -DCMAKE_TOOLCHAIN_FILE="$DIR/toolchains/$TOOLCHAIN_NAME.cmake" $CMAKE_OPTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,3 @@ | ||
#!/usr/bin/env bash | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# Accomodate both linux windows mingw locations | ||
if [ -z "$ARCH" ]; then | ||
ARCH=32 | ||
fi | ||
|
||
MINGW=/mingw$ARCH | ||
|
||
if [ -z "$MSYSCON" ]; then | ||
MINGW=/opt$MINGW | ||
|
||
DISTRO=$(lsb_release -si) | ||
DISTRO_VERSION=$(lsb_release -sr) | ||
|
||
if [ "$DISTRO" != "Ubuntu" ]; then | ||
echo "This script only supports Ubuntu" | ||
exit 1 | ||
fi | ||
|
||
if [ "$DISTRO_VERSION" == "14.04" ]; then | ||
TOOLCHAIN="$DIR/toolchains/Ubuntu-MinGW-X-Trusty-$ARCH.cmake" | ||
else | ||
TOOLCHAIN="$DIR/toolchains/Ubuntu-MinGW-W64-$ARCH.cmake" | ||
fi | ||
else | ||
TOOLCHAIN="$DIR/toolchains/MSYS-$ARCH.cmake" | ||
fi | ||
|
||
export PATH=$MINGW/bin:$PATH | ||
export CXXFLAGS="$CFLAGS" | ||
if [ "$ARCH" == "32" ]; then | ||
export CFLAGS="-march=pentium4 -mtune=generic -mpreferred-stack-boundary=5 -mfpmath=sse" | ||
fi | ||
|
||
CMAKE_OPTS="-DCMAKE_PREFIX_PATH=$MINGW $CMAKE_OPTS" | ||
|
||
# shellcheck disable=SC2086 | ||
cmake "$DIR/.." -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" $CMAKE_OPTS | ||
ARCH=32 "$DIR/build_mingw.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env bash | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
ARCH=64 "$DIR/build_win32.sh" | ||
ARCH=64 "$DIR/build_mingw.sh" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.