PREFIX=${PREFIX}/${TARGET} #zlib - http://zlib.net/zlib-1.2.11.tar.gz cd ${OBJDIR} && \ tar xf ~/zlib-*.tar.gz && \ cd zlib-* && \ make -j"$(nproc)" -f win32/Makefile.gcc PREFIX=${TARGET}- && \ make -j"$(nproc)" -f win32/Makefile.gcc INCLUDE_PATH="$(pwd)/dest/include" \ LIBRARY_PATH="$(pwd)/dest/lib" \ BINARY_PATH="$(pwd)/dest/lib" SHARED_MODE=1 install && \ rm -rf dest/lib/{libz.a,pkgconfig} && \ cp -a dest/* "${PREFIX}" #zlib32 make -j"$(nproc)" -f win32/Makefile.gcc clean && rm -rf dest && \ make -j"$(nproc)" -f win32/Makefile.gcc PREFIX="${TARGET}-" LOC="-m32" LDFLAGS="-m32 -Wl,-mi386pe" RC="${TARGET}-windres -F pe-i386" && \ make -j"$(nproc)" -f win32/Makefile.gcc INCLUDE_PATH="$(pwd)/dest/include" LIBRARY_PATH="$(pwd)/dest/lib32" \ BINARY_PATH="$(pwd)/dest/lib32" SHARED_MODE=1 install && \ rm -rf dest/{include,lib32/{libz.a,pkgconfig}} && \ cp -a dest/* ${PREFIX} #libpng - http://prdownloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz cd ${OBJDIR} && \ tar xf ~/libpng-*.tar.xz && cd libpng-*/ && \ ./configure --prefix=${PREFIX} --host=${TARGET} --disable-static && \ make -j"$(nproc)" && \ make -j4 install-strip DESTDIR="$(pwd)/dest" && \ mv dest/${PREFIX}/bin/*.dll dest/${PREFIX}/lib && \ find dest -print0 -name '*.la' -delete && \ rm -rf dest/${PREFIX}/{bin,lib/pkgconfig,share} && \ cp -a dest/${PREFIX}/* ${PREFIX} #libpng32 rm -rf dest && make distclean && \ ./configure --prefix=${PREFIX} --host=${TARGET} --disable-static --libdir=${PREFIX}/lib32 CFLAGS="-m32" LDFLAGS="-m32 -Wl,-mi386pe" RC="${TARGET}-windres -F pe-i386" && \ make -j"$(nproc)" && \ make -j4 install-strip DESTDIR="$(pwd)/dest" && \ mv dest/${PREFIX}/bin/*.dll dest/${PREFIX}/lib32 && \ find dest -print0 -name '*.la' -delete && \ rm -rfv dest/${PREFIX}/{bin,include,lib32/pkgconfig,share} && \ cp -a dest/${PREFIX}/* ${PREFIX} #portaudio http://www.portaudio.com/archives/pa_snapshot.tgz cd ${OBJDIR} && \ tar xf ~/pa_snapshot.tgz && \ cd portaudio && \ ./configure --prefix=${PREFIX} --host=${TARGET} --disable-static && \ make -j"$(nproc)" && \ make -j4 install DESTDIR="$(pwd)/dest" && \ mv dest/${PREFIX}/bin/*.dll dest/${PREFIX}/lib && \ rm -rf dest/${PREFIX}/{bin,lib/pkgconfig} && \ find dest -name '*.la' -delete && \ find dest -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ find dest -name '*.a' | xargs ${TARGET}-strip -g && \ cp -a dest/${PREFIX}/* ${PREFIX} #portaudio32 make distclean && rm -rf dest ./configure --prefix=${PREFIX} --host=${TARGET} --disable-static --libdir=${PREFIX}/lib32 CFLAGS="-m32" LDFLAGS="-m32 -Wl,-mi386pe" && \ make -j"$(nproc)" && \ make -j4 install DESTDIR="$(pwd)/dest" && \ mv $(pwd)/dest/${PREFIX}/bin/*.dll $(pwd)/dest/${PREFIX}/lib32 && \ rm -rf dest/${PREFIX}/{bin,include,lib32/pkgconfig} && \ find dest -name '*.la' -delete && \ find dest -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ find dest -name '*.a' | xargs ${TARGET}-strip -g && \ cp -a dest/${PREFIX}/* ${PREFIX} #ncurses cd ${OBJDIR} && \ tar xf ~/ncurses*.tar.gz && \ #git clone https://github.com/mirror/ncurses.git # cd ncurses* && \ ./configure --prefix=${PREFIX} --host=${TARGET} --enable-sp-funcs --enable-term-driver --enable-interop --with-shared --without-manpages --without-progs --without-debug --without-tests && \ make -j"$(nproc)" && make -j4 install DESTDIR="$(pwd)/dest" && \ mv dest/${PREFIX}/bin/*.dll dest/${PREFIX}/lib && \ rm -rf dest/${PREFIX}/{bin,share,lib/terminfo} find dest \( -name '*.a' -not -name '*.dll.a' \) -delete find dest -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ cp -a dest/${PREFIX}/* ${PREFIX} #ncurses 32 cd ${OBJDIR}/ncurses* #git clean -fdx && git reset --hard && \ rm -rf dest && \ make distclean -j4 && \ ./configure --prefix=${PREFIX} --host=${TARGET} --enable-sp-funcs --enable-term-driver --enable-interop --with-shared --without-manpages --without-progs --without-debug --without-tests --libdir=${PREFIX}/lib32 CFLAGS="-O2 -m32" CXXFLAGS="-O2 -m32" LDFLAGS="-m32 -Wl,-mi386pe" && \ make -j"$(nproc)" && make -j4 install DESTDIR="$(pwd)/dest" && \ mv dest/${PREFIX}/bin/*.dll dest/${PREFIX}/lib32 && \ rm -rf dest/${PREFIX}/{bin,include,lib/terminfo,share} && \ find dest \( -name '*.a' -not -name '*.dll.a' \) -delete find dest -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ cp -a dest/${PREFIX}/* ${PREFIX} #readline #patch https://raw.githubusercontent.com/mxe/mxe/master/src/readline-1.patch #http://git.savannah.gnu.org/cgit/readline.git/snapshot/readline-master.tar.gz cd ${OBJDIR} && \ tar xf ~/readline*.tar.gz && \ cd readline* && \ patch -p1 < ~/readline-MXE.patch && \ ./configure --prefix=${PREFIX} --host=${TARGET} --disable-static --enable-multibyte && \ make -j$(nproc) && make install DESTDIR="$(pwd)/dest" && \ mv dest/${PREFIX}/bin/*.dll dest/${PREFIX}/lib && \ find dest -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ rm -rf dest/${PREFIX}/{bin,lib/pkgconfig,share} && \ cp -a dest/${PREFIX}/* ${PREFIX} #readline32 rm -rf dest && make distclean && \ ./configure --prefix=${PREFIX} --host=${TARGET} --disable-static --enable-multibyte --libdir=${PREFIX}/lib32 CFLAGS="-m32 -pipe" LDFLAGS="-m32 -Wl,-mi386pe" && \ make -j"$(nproc)" && make install DESTDIR="$(pwd)/dest" && \ mv dest/${PREFIX}/bin/*.dll dest/${PREFIX}/lib32 && \ find dest -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ find dest -name '*.a' | xargs ${TARGET}-strip -g && \ rm -rf dest/${PREFIX}/{bin,include,lib32/pkgconfig,share} && \ cp -a dest/${PREFIX}/* ${PREFIX} #SDL2 cd ${OBJDIR} tar xf ~/SDL2*.tar.gz && \ cd SDL2* && \ ./configure --prefix=${PREFIX} --host=${TARGET} --disable-static && \ sed -i 's/\-g /-pipe /' Makefile && \ make -j"$(nproc)" V=1 && make install DESTDIR="$(pwd)/dest" && \ mv dest/${PREFIX}/bin/*.dll dest/${PREFIX}/lib && \ rm -rfv dest/${PREFIX}/{bin,lib/{pkgconfig,cmake},share} && \ find dest -name '*.la' -delete && \ find dest -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ find dest -name '*.a' | xargs ${TARGET}-strip -g && \ cp -a dest/${PREFIX}/* ${PREFIX} #SDL32 rm -rf dest && make distclean && \ ./configure --prefix=${PREFIX} --host=${TARGET} --disable-static --libdir=${PREFIX}/lib32 CFLAGS="-O3 -m32 -pipe" LDFLAGS="-m32 -Wl,-mi386pe" WINDRES="${TARGET}-windres -F pe-i386" && \ make -j"$(nproc)" V=1 && make install DESTDIR="$(pwd)/dest" && \ mv dest/${PREFIX}/bin/*.dll dest/${PREFIX}/lib32 && \ rm -rf dest/${PREFIX}/{bin,include,lib32/{pkgconfig,cmake},share} && \ find dest -name '*.la' -delete && \ find dest -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ find dest -name '*.a' | xargs ${TARGET}-strip -g && \ cp -a dest/${PREFIX}/* ${PREFIX} #CapsImage cd ${OBJDIR} && \ git clone https://github.com/FrodeSolheim/capsimg.git && cd capsimg && \ ./bootstrap.fs && \ ./configure.fs --host=${TARGET} && \ sed -i 's/\-g /-pipe /' CAPSImg/Makefile && \ make -C CAPSImg -j$(nproc) find . -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ find . -name '*.a' | xargs ${TARGET}-strip -g && \ cp CAPSImg/capsimg.dll* ${PREFIX}/lib && \ mkdir -p ${PREFIX}/include/caps5 && \ cp LibIPF/* Core/CommonTypes.h ${PREFIX}/include/caps5 IMPORTANT!!!!! vim ${PREFIX}/include/caps5/CommonTypes.h Remove all lines between the two: // Linux change // #Capsimg32 git clean -fdx && \ ./bootstrap.fs && \ ./configure.fs --host=${TARGET} CFLAGS="-O2 -m32" LDFLAGS="-m32 -Wl,-mi386pe" && \ make -C CAPSImg -j$(nproc) && \ find . -name '*.dll' | cut -f 1 -d : | xargs ${TARGET}-strip -s && \ find . -name '*.a' | xargs ${TARGET}-strip -g && \ cp CAPSImg/capsimg.dll* ${PREFIX}/lib32