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