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 $@