This repository has been archived by the owner on Mar 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cross-mingw: new script to cross compile for mingw
Closes #3
- Loading branch information
1 parent
7e30516
commit eeae3cb
Showing
2 changed files
with
33 additions
and
1 deletion.
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 |
---|---|---|
@@ -1 +1 @@ | ||
bin_SCRIPTS = cross-android cross-ios | ||
bin_SCRIPTS = cross-android cross-ios cross-mingw |
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,32 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ $# -lt 1 ]; then | ||
echo "$0 x86_64 [.../]configure [args...]" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
architecture=$1 | ||
shift | ||
|
||
if [ "$architecture" != "x86_64" ]; then | ||
echo "$0: unsupported architecture: $architecture" 1>&2 | ||
exit 1 | ||
fi | ||
configureflags="--host=x86_64-w64-mingw32" | ||
|
||
set -x | ||
export AR="x86_64-w64-mingw32-ar" | ||
export AS="x86_64-w64-mingw32-as" | ||
export CC="x86_64-w64-mingw32-gcc" | ||
export CFLAGS="-Wall -O2" | ||
export CPP="x86_64-w64-mingw32-cpp" | ||
export CXX="x86_64-w64-mingw32-g++" | ||
export CXXFLAGS="-Wall -O2" | ||
export LD="x86_64-w64-mingw32-ld" | ||
export NM="x86_64-w64-mingw32-nm" | ||
export PATH="/usr/local/bin:/usr/bin:/bin" | ||
export RANLIB="x86_64-w64-mingw32-ranlib" | ||
export STRIP="x86_64-w64-mingw32-strip" | ||
|
||
$@ $configureflags |