| 1 |
How to compile FlightGear with mingw |
| 2 |
==================================== |
| 3 |
|
| 4 |
|
| 5 |
MinGW & MSYS |
| 6 |
============ |
| 7 |
|
| 8 |
You need to install mingw & msys: |
| 9 |
|
| 10 |
http://www.mingw.org |
| 11 |
|
| 12 |
You need at least: |
| 13 |
|
| 14 |
MinGW: binutils, gcc-core, gcc-g++, mingw-runtime, mingw-utils, w32api |
| 15 |
I would recommed the gcc-3.4.4 versions. |
| 16 |
MSYS: msys-1.0.10.exe, msys-autoconf, msys-automake, msys-libtool, msys-DTK. |
| 17 |
|
| 18 |
Please read instructions carefully. |
| 19 |
|
| 20 |
Set the follwing environment variables within msys shell. |
| 21 |
|
| 22 |
export CFLAGS="-I/usr/local/include -O2" |
| 23 |
export CXXFLAGS="-I/usr/local/include -O2" |
| 24 |
export CPPFLAGS=-I/usr/local/include |
| 25 |
export LDFLAGS=-L/usr/local/lib |
| 26 |
|
| 27 |
Pthread-win32 |
| 28 |
============= |
| 29 |
|
| 30 |
http://sources.redhat.com/pthreads-win32/ |
| 31 |
|
| 32 |
compile: |
| 33 |
make GCE-inlined |
| 34 |
|
| 35 |
Install: |
| 36 |
cp pthread.h sched.h semaphore.h /usr/local/include |
| 37 |
cp linpthreadGCE2.a /usr/local/lib/libpthread.a |
| 38 |
cp pthread-GCE.dll /usr/local/bin |
| 39 |
|
| 40 |
patch header: |
| 41 |
|
| 42 |
--- pthread.h Sat Oct 1 20:56:43 2005 |
| 43 |
*************** |
| 44 |
*** 210,218 **** |
| 45 |
* ----------------- |
| 46 |
*/ |
| 47 |
|
| 48 |
! #if HAVE_CONFIG_H |
| 49 |
! #include "config.h" |
| 50 |
! #endif /* HAVE_CONFIG_H */ |
| 51 |
|
| 52 |
#ifndef NEED_FTIME |
| 53 |
#include <time.h> |
| 54 |
--- 210,218 ---- |
| 55 |
* ----------------- |
| 56 |
*/ |
| 57 |
|
| 58 |
! //#if HAVE_CONFIG_H |
| 59 |
! //#include "config.h" |
| 60 |
! //#endif /* HAVE_CONFIG_H */ |
| 61 |
|
| 62 |
#ifndef NEED_FTIME |
| 63 |
#include <time.h> |
| 64 |
|
| 65 |
GLUT |
| 66 |
==== |
| 67 |
|
| 68 |
use precompiled in order to avoid conflicts with glut32.dll already installed. |
| 69 |
|
| 70 |
http://www.xmission.com/~nate/glut.html |
| 71 |
http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip |
| 72 |
|
| 73 |
The header has to be updated with respect to MINGW. |
| 74 |
|
| 75 |
*** glut.h Tue Dec 12 22:22:52 2000 |
| 76 |
--- /local_old/include/GL/glut.h Thu Aug 18 20:41:15 2005 |
| 77 |
*************** |
| 78 |
*** 20,26 **** |
| 79 |
/* XXX This is from Win32's <windef.h> */ |
| 80 |
# ifndef APIENTRY |
| 81 |
# define GLUT_APIENTRY_DEFINED |
| 82 |
! # if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) |
| 83 |
# define APIENTRY __stdcall |
| 84 |
# else |
| 85 |
# define APIENTRY |
| 86 |
--- 20,26 ---- |
| 87 |
/* XXX This is from Win32's <windef.h> */ |
| 88 |
# ifndef APIENTRY |
| 89 |
# define GLUT_APIENTRY_DEFINED |
| 90 |
! # if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) || defined(__MINGW32__) |
| 91 |
# define APIENTRY __stdcall |
| 92 |
# else |
| 93 |
# define APIENTRY |
| 94 |
|
| 95 |
|
| 96 |
install: |
| 97 |
cp glut.h /usr/local/include |
| 98 |
cp glut32.dll /usr/local/bin |
| 99 |
|
| 100 |
reimp glut32.lib |
| 101 |
cp libglut32.a /usr/local/lib |
| 102 |
|
| 103 |
OpenAL |
| 104 |
====== |
| 105 |
|
| 106 |
Get OpenAL for instance from Creative |
| 107 |
|
| 108 |
OpenAL win32 package |
| 109 |
install Redist |
| 110 |
|
| 111 |
|
| 112 |
install: |
| 113 |
|
| 114 |
cd libs |
| 115 |
reimp OpenAL32.lib |
| 116 |
cp libopenal32.a /usr/local/lib |
| 117 |
cp alut.lib /usr/local/lib/libalut.a |
| 118 |
cd .. |
| 119 |
mkdir /usr/local/include/AL |
| 120 |
cp Include/* /usr/local/include/AL |
| 121 |
|
| 122 |
|
| 123 |
zlib-1.2.3 |
| 124 |
========== |
| 125 |
|
| 126 |
configure --prefix=/usr/local |
| 127 |
make |
| 128 |
make install |
| 129 |
|
| 130 |
plib-1.6.8 |
| 131 |
========== |
| 132 |
configure --prefix=/usr/local |
| 133 |
make |
| 134 |
make install |
| 135 |
|
| 136 |
simgear |
| 137 |
======= |
| 138 |
get simgear from CVS |
| 139 |
configure --prefix=/usr/local |
| 140 |
make |
| 141 |
make install |
| 142 |
|
| 143 |
flightgear |
| 144 |
========= |
| 145 |
configure --prefix=/usr/local --with-threads |
| 146 |
make |
| 147 |
make install |
| 148 |
|