From 14e40fe4bf265dedcca92324fbf985cac394376c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Tue, 18 Dec 2012 00:21:14 -0300 Subject: [PATCH] Added a script to help (me) to cross compile win binaries/libs from linux. Fixed links order. Added static-libstdc++ again, i've an installation problem in my win 7, but i can compile with the cross, so it's not an error. --- premake4.lua | 12 ++++++++---- projects/mingw32/mingw32-cross-compile.sh | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 projects/mingw32/mingw32-cross-compile.sh diff --git a/premake4.lua b/premake4.lua index 59e591b5b..3106f02c1 100644 --- a/premake4.lua +++ b/premake4.lua @@ -96,12 +96,17 @@ function build_link_configuration( package_name ) if not _OPTIONS["with-eepp-static"] then links { "eepp-shared" } else - links { link_list } links { "eepp-static" } add_static_links() + links { link_list } end end + configuration "windows" + if _ACTION == "gmake" then + linkoptions { "-static-libgcc", "-static-libstdc++" } + end + configuration "debug" defines { "DEBUG", "EE_DEBUG", "EE_MEMORY_MANAGER" } @@ -331,10 +336,9 @@ function build_eepp( build_name ) configuration "windows" files { "src/eepp/window/platform/win/*.cpp" } - linkoptions { "-mwindows" } - + if _ACTION == "gmake" then - linkoptions { "-static-libgcc" } --, "-static-libstdc++" -- this should work, but it's not working with my mingw installation + linkoptions { "-static-libgcc", "-static-libstdc++" } end configuration "linux" diff --git a/projects/mingw32/mingw32-cross-compile.sh b/projects/mingw32/mingw32-cross-compile.sh new file mode 100755 index 000000000..9df1f5e8f --- /dev/null +++ b/projects/mingw32/mingw32-cross-compile.sh @@ -0,0 +1,4 @@ +#!/bin/sh +cd $(dirname "$0") +cd ../../make/windows/ +make -j4 -e CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ AR=i686-w64-mingw32-ar $@