File: README.XMINGW

package info (click to toggle)
bzflag 2.0.8.20060605
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 29,168 kB
  • ctags: 33,169
  • sloc: cpp: 132,719; ansic: 14,122; sh: 13,441; makefile: 2,330; php: 428; python: 334; perl: 287; objc: 243; xml: 180
file content (114 lines) | stat: -rw-r--r-- 3,150 bytes parent folder | download
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
This README describe a way to build from a linux PC executable for M$

My favourite distribution is gentoo, so I'm going to go step by step on this.

We need to emerge the 4 packet that build the cross platform factory:
 - xmingw-binutils
 - xmingw-gcc
 - xmingw-w32api
 - xmingw-runtime

xmingw-binutils should be at least the version 2.15.90.0.2

This operation should be made by superuser.

# emerge xmingw-runtime

It seems the g++ is enabled only if you re-emerge xmingw-gcc. So, as bzflag is
written in c++:

# emerge xmingw-gcc

Next operation are available to a non super-user too, so a normal user is the
preferred way.

Add to your path the cross compilation factory directory:

$ export PATH=/opt/xmingw/bin:$PATH

------ c-ares
Get c-ares source, untar them and create a directory where to build the c-ares.
Go to this brand new directory and type:

../c-ares-1.2.1/configure \
--host=i386-mingw32msvc --build=i686-pc-linux-gnu \
--prefix=/opt/xmingw/i386-mingw32msvc
make
make install

Last operation require /opt/xmingw being writeable

------ curl
Get curl source, untar them and create a directory where to build the curl.

There is a bug on curl when trying to detect the c-ares library.
So go to the curl directory and apply the patch to configure.ac

-       LIBS="$LIBS -lcares"
+       AC_CHECK_LIB(cares, ares_cancel)

then run autoconf from the same directory


Go to the directory where to build and type:

../curl-7.14.0/configure --host=i386-mingw32msvc --build=i686-pc-linux-gnu \
--prefix=/opt/xmingw --enable-ares --disable-shared
make
make install

apply the patch to /opt/xmingw/bin/curl-config:

--- curl-config.orig    2005-05-22 22:52:16.000000000 +0200
+++ curl-config 2005-05-22 22:54:56.000000000 +0200
@@ -120,9 +120,9 @@

     --cflags)
                if test "X${prefix}/include" = "X/usr/include"; then
-          echo ""
+          echo "-DBUILDING_LIBCURL"
         else
-          echo "-I${prefix}/include"
+          echo "-I${prefix}/include -DBUILDING_LIBCURL"
         fi
                ;;

Last operations require /opt/xmingw being writeable

------ libSDL
Get libSDL source, untar them and create a directory where to build it.

Get some extra windows file that libSDL needs:
http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz
Create a new directory and unpack the directx-devel file here. You'll have an
include directory and a lib directory. Copy all the file from the include
directory into /opt/xmingw/i386-mingw32msvc/include/ . You need su privileges
to do that.


Type
../SDL-1.2.8/configure --host=i386-mingw32msvc --build=i686-pc-linux-gnu \
--prefix=/opt/xmingw

make
make install

------ bzflag
Now, time to get a copy of bzflag, from CVS or from source tarball.

When you have your source tree exploded, go to the root of this tree and:

$ sh autogen.sh

Now create a build directory where you'll generate:

$ mkdir ../distmw
$ cd ../distmw


and configure the build directory to use the cross-factory:

$ ../bzflag/configure --host=i386-mingw32msvc --build=i686-pc-linux-gnu \
     --without-x --enable-debug --disable-plugins --prefix=`pwd`/bindist
$ make
$ make install