1 # This file is in the public domain for what it's worth.
2 # Written by Jānis Rūcis <parasti@gmail.com>
3 # Last updated in September, 2008.
7 # * If the date above seems too far back in the past, the stuff
8 # below is likely horribly outdated and only of historic relevance.
11 # * Some of the variables below will have to be modified for the
12 # script to be useful on your system. These include MINGW_PREFIX,
15 # * The script is deliberately minimalistic. Its primary purpose is
16 # to provide a proper cross-compilation environment for Neverball
17 # and its dependencies, so you will probably need to add more
18 # variables to get your own software to compile.
20 # * This script is designed to be as transparent as possible, so
21 # that no changes are necessary to a build system. However, due to
22 # there being no way to inform GCC of a non-standard library path
23 # when cross-compiling, a build system still has support the LDFLAGS
24 # environment variable.
26 # If 'make install' is used to install this script, a few of the
27 # settings below are overwritten with the ones from the Makefile.
29 MINGW_PREFIX
=~
/dev
/mingw
32 # This isn't plain 'wine' because in Debian the Wine in PATH is
33 # actually the Winelauncher script, which is a bit too slow and too
34 # helpful for our tastes.
36 # Useful for builds that use their own functionality half-way through.
37 WINE
=/usr
/lib
/wine
/wine.bin
40 # Some rationale for why some of the variables below have to be
41 # specified: it appears that configure scripts use different methods
42 # to determine whether cross-compilation is in effect. Some rely on
43 # the specified compiler, some require that --host be specified, some
44 # only work properly when both --build and --host are provided (which
45 # is strange considering that most of them are able to detect the
46 # build system automatically).
48 # config.guess is available in the autotools-dev package on Debian and
49 # in most autotools-based packages. You can probably use the script
50 # if you need some flexibility.
52 #BUILD=$(sh /usr/share/misc/config.guess)
54 # TARGET is the exact prefix of the cross binaries sans hyphen.
55 TARGET
=i586-mingw32msvc
58 # The variables above do not need to be exported.
59 # No exports here, move along!
67 # Appears to be used by libtool, although I haven't (yet) run into any
73 # When a project that uses libtool does not inform libtool that it has
74 # been ported to build native Windows DLLs (by using the
75 # AC_LIBTOOL_WIN32_DLL macro in configure.in or, since this macro has
76 # been deprecated recently, some other equivalent way), dynamic
77 # libraries fail to build. Although libtool documentation does
78 # mention this requirement, libtool itself does not seem to handle
79 # this cleanly and fails in obscure ways. Explicitly setting OBJDUMP
80 # is (sometimes) a sufficient work-around. (Note that this might have
81 # been fixed to some extent in recent libtool versions.)
83 # This is an incomplete list of binary utilies. Expand as needed.
85 OBJDUMP
=$TARGET-objdump
94 WINDRES
=$TARGET-windres
100 # CFLAGS and CPPFLAGS aren't always the best place for setting these.
101 # Instead, we inform GCC directly.
103 CPATH
="$MINGW_PREFIX/include:$CPATH"
106 # The LIBRARY_PATH environment variable would be the perfect way of
107 # letting GCC know in which directories to look for libraries, but
108 # unfortunately it is not used when cross compiling. The reason for
109 # this remains a mystery.
111 LDFLAGS
="-L$MINGW_PREFIX/lib $LDFLAGS"
114 # This particular PATH setting is seen often in cross compilation
115 # scripts, but I have only experienced problems with it and haven't
116 # yet come across a setup where it's actually necessary.
118 #PATH="$MINGW_PREFIX/bin:/usr/$TARGET/bin:$PATH" # Bad idea.
119 PATH
="$MINGW_PREFIX/bin:$PATH" # Good idea.
122 # If configure picks up build system's pkg-config, we politely ask it
123 # to look in all the right places. Might not work with an old
126 PKG_CONFIG_LIBDIR
="$MINGW_PREFIX/lib/pkgconfig"
127 export PKG_CONFIG_LIBDIR