Compiling SDL with mingw32ce

I just thought I would share with you my experiences of compiling SDL
with mingw32ce. For those of you that don’t know this is a part of the
cegcc project that creates native WinCE applications without the cegcc
emulation layer. The compilation is now almost flawless because of the
changes proposed here:

Unfortunately I still ran into some problems compiling the current SDL
1.2 SVN sources. Firstly, the location of the ‘-wince’ entry in is important - it needs to come before the cygwin/mingw32
entries (unlike after as it is in the svn) otherwise the target
’arm-wince-mingw32ce’ will match --mingw32* first and think its
compiling on win32. Secondly, there appears to be a use of getenv in
events/SDL_keyboard.c that is not conditionally compiled based upon
HAVE_GETENV (mingw32ce doesn’t provide getenv).

Other than that, after applying the changes to the wince headers in the
link above, the dll compiles perfectly and the test suite works on a WM6
device but not on a WM6.1 device (although I believe that is due to
changes in the dll loader in wm6.1 which are being discussed on the
cegcc mailing list).