Skip to content

Instantly share code, notes, and snippets.

@mpersano
Last active February 6, 2016 23:24
Show Gist options
  • Save mpersano/14d2227462ebbfee4b92 to your computer and use it in GitHub Desktop.
Save mpersano/14d2227462ebbfee4b92 to your computer and use it in GitHub Desktop.

Libraries/binaries will be installed under $HOME/cross-win32.

mingw-w64

apt-get install mingw-w64

zlib

http://zlib.net/zlib-1.2.8.tar.gz

CROSS_PREFIX=i686-w64-mingw32- ./configure --prefix=$HOME/cross-win32 --static
make && make install

libpng 1.2

http://sourceforge.net/projects/libpng/files/libpng12/1.2.56/libpng-1.2.56.tar.gz

LDFLAGS=-L$HOME/cross-win32/lib CPPFLAGS=-I$HOME/cross-win32/include ./configure --host=i686-w64-mingw32 --prefix=$HOME/cross-win32
make && make install

SDL 1.2

https://www.libsdl.org/release/SDL-1.2.15.tar.gz

./configure --host=i686-w64-mingw32 --prefix=$HOME/cross-win32
make && make install

GLEW

https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0.tgz

make SYSTEM=linux-mingw-w64 PREFIX=$HOME/cross-win32 GLEW_DEST=$HOME/cross-win32 install

PhysicsFS

https://icculus.org/physfs/downloads/physfs-2.0.3.tar.bz2

mkdir build
cd build
cmake -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_FIND_ROOT_PATH=${HOME}/cross-win32 -DCMAKE_INSTALL_PREFIX=${HOME}/cross-win32 ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment