1#!/bin/bash 2 3# NOTE: See 'mk-xmingw' for a more up-to-date cross-compilation script 4# for the MinGW cross-compiler that comes with Debian. 5 6# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 7# 8# Cross-compiling to Win32 using MinGW32. This is not impossible, but 9# not dead easy either. Much as I wanted to get a Win32 version 10# working, I couldn't stand the impossibly unusable DOS shell, so 11# cross-compilation was the only alternative. The bits you need can 12# all be found on the SDL home page: 13# 14# http://www.libsdl.org/ 15# http://www.libsdl.org/Xmingw32/ 16# 17# The second link is important because it is not directly and 18# obviously linked off the main pages. It contains the downloads for 19# the MinGW cross-compiler. These are pre-built, saving you lots more 20# messing around, although check out the MinGW pages for the original 21# source: 22# 23# http://mingw.sourceforge.net/ 24# 25# Probably if you're more comfortable with the DOS shell than I am, 26# then you'll make more progress using the native MinGW compiler and the 27# standard Win32 SDL downloads. I can't help you much with this, though. 28# 29# Apr-2002: You might also try MSYS which is now available from the 30# MinGW pages, for a full UNIX shell for building MinGW apps. 31 32export PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH 33 34#OPT="-g -O2 -Wall" 35OPT="-s -O3" 36 37LIB="-L/usr/local/cross-tools/i386-mingw32msvc/lib -lmingw32 -lwinmm" 38INC="-I/usr/local/cross-tools/i386-mingw32msvc/include" 39 40gcc $OPT $INC -DT_MINGW -o sbagen.exe sbagen.c $LIB 41 42cp sbagen.exe ~/win/jim 43 44 45 46