X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=README.mingw_cross;h=517734ad1080559ccbc1ac8c8147684ce3e526bc;hb=ea46c9f7ece4897adb3e0f529b082cea51442cd8;hp=63eb435bb10ec0eb472e0ec026856f94978fa10a;hpb=1f0a09b0b68542b61e03832a43bdf781a16ac4ad;p=freeglut diff --git a/README.mingw_cross b/README.mingw_cross index 63eb435..517734a 100644 --- a/README.mingw_cross +++ b/README.mingw_cross @@ -1,24 +1,49 @@ -Cross-compilation from GNU/Linux (static and shared DLL) -======================================================== - -Install MinGW32 and prepare FreeGLUT on Debian/Ubuntu: - - apt-get install mingw32 - ./configure --host=i586-mingw32msvc --prefix=/freeglut - -Install MinGW32 and prepare FreeGLUT on Fedora: - - yum install mingw32-gcc - ./configure --host=i686-pc-mingw32 --prefix=/freeglut - -Cross-compile! - - make - make install DESTDIR=$(pwd) - -Everything is in the new freeglut/ directory. -The .dll is in the freeglut/bin/. - - -Compilation of your own programs is done as usual. -See README.cygwin_mingw for details. +Cross-compilation from GNU/Linux (static and shared DLL) +======================================================== + +Install MinGW, and specify which MinGW you're using: + +- on Debian/Ubuntu, mingw-w64, 64-bit executables: + + apt-get install mingw-w64 + GNU_HOST=x86_64-w64-mingw32 + +- on Debian/Ubuntu, mingw-w64, 32-bit executables: + + apt-get install mingw-w64 + GNU_HOST=i686-w64-mingw32 + +- on Fedora, mingw32, 32-bit executables: + + yum install mingw32-gcc + GNU_HOST=i686-pc-mingw32 + +- on Debian/Ubuntu, mingw32 (deprecated): + + apt-get install mingw32 + GNU_HOST=i586-mingw32msvc + + +With CMake +---------- + +Cross-compile with: + + mkdir cross-woe/ && cd cross-woe/ + cmake \ + -D GNU_HOST=$GNU_HOST \ + -D CMAKE_TOOLCHAIN_FILE=mingw_cross_toolchain.cmake \ + -D CMAKE_INSTALL_PREFIX=/freeglut \ + .. + make -j4 + make install DESTDIR=$(pwd) + +Everything is now in the new 'freeglut/' directory. +The .dll is in 'freeglut/lib/'. + + +Compiling your code +------------------- + +Compilation of your own programs is done as usual. +See README.cygwin_mingw for details.