]> git.mxchange.org Git - flightgear.git/blob - README.Unix
Lighting/ssgSimpleState fixes.
[flightgear.git] / README.Unix
1 If you are reading this in hopes that you will find the answer to a
2 specific question, please send the question to curt@flightgear.org and
3 suggest that I include the answer here.
4
5
6 I. Compilers and Portability
7 ============================
8
9 Flight Gear is known to build with egcs-1.1 and higher, as well as
10 gcc-2.8 and higher.  Your mileage may vary with earlier versions of
11 these compilers although support for gcc-2.7.x is mostly there.
12
13 For other platforms where you may have access to native compilers,
14 again your mileage may vary.  We would like to support as many
15 different compilers and platforms as possible.  Please relay any
16 changes you make (or problems you encounter) back to
17 curt@flightgear.org, so that in the future we can better support your
18 platform and your compiler.  I have access to a few different
19 platforms, but I must depend on others to make sure their favorite
20 platform and compiler is well supported.
21
22
23 II. GLUT
24 ========
25
26 Flight Gear requires GLUT version 3.7 or later (aka GameGLUT._ GLUT
27 needs to be installed on your system before you can build Flight Gear.
28 GLUT can be found at:
29
30     http://reality.sgi.com/opengl/glut3/glut3.html
31
32 GLUT (pronounced like the glut in gluttony) is the OpenGL Utility
33 Toolkit, a window system independent toolkit for writing OpenGL
34 programs. It implements a simple windowing application programming
35 interface (API) for OpenGL. GLUT makes it considerably easier to learn
36 about and explore OpenGL programming.  GLUT provides a portable API so
37 you can write a single OpenGL program that works on both Win32 PCs and
38 X11 workstations.
39
40
41 III. Joystick Support
42 =====================
43
44 GLUT only has win32 joystick support but even at that, it is not well
45 implimented.  So we use Steve Backer's joystick library when possible,
46 and fall back to GLUT for win32 until Steve's library adds win32
47 support.
48
49 To make sure joystick support is included when building under Linux:
50
51   - make sure you have the proper joystick module installed.
52   - make sure the proper devices are created in /dev.
53   - /usr/include/linux/joystick.h must exist on your system.
54
55
56 IV. Procedure to build FGFS with Native SGI Irix Compilers from CVS Sources
57 ===========================================================================
58
59 (Contributed by Todd Smith <msmith@sikorsky.com>)
60
61 Download the latest version of plib (1.0.13) from:
62
63     http://www.woodsoup.org/~sbaker/plib/
64
65 Install it with the default prefix of /usr/local which places
66 everthing in a tree rooted at /usr/local/plib:
67
68     sh$ CC="cc -Xcpluscomm" CXX=CC ./configure
69
70 Fix up the Makefiles using the script provided with the Flight Gear
71 distribution:
72
73     find . -name Makefile -exec .../src/FlightGear-0.7.0/irix-hack.pl {} \;
74
75 Download the FlightGear-0.7.x via anonymous cvs as usual, then do:
76
77 > aclocal               # normal
78 > automake -a -i        # added '-i' flag to avoid dependency calc
79                         # that only sgi cc/CC doesn't support
80 > autoconf              # normal
81
82 Note the change in automake's command argument.
83
84 Now set env variables to use native compilers (csh syntax).
85
86 > setenv CC cc
87 > setenv CXX CC
88 > setenv CFLAGS '-Xcpluscomm -DEBUG:suppress=1001,1012,1014,
89                             1116,1172,1174,1401,1460,1551,1552'
90 > setenv CXXFLAGS '-DEBUG:suppress=1001,1012,1014,1116,1172,
91                           1174,1401,1460,1551,1552,3303,3322'
92
93 The '-DEBUG:suppress=' stuff just suppresses anonying warnings during
94 compile.  The meaning of each one is shown later in this file.
95 You can use all or none of these here.
96
97 > setenv CPPFLAGS '-woff 1014'
98
99 This is required so that configure will really believe that plib
100 is installed.  ( Otherwise a compiler warning makes configure
101 that plib/pu.h couldn't be found. )
102
103 > ./configure
104 > find . -name Makefile -exec irix-hack.pl {} \;        # normal irix hack
105 > gmake
106
107 Runs great.
108
109 Todd
110 msmith@sikorsky.com
111
112 -------------------------------------------
113 Warnings that I get. Ignore at your lesiure.
114
115 C and C++:
116 warning(1001): last line of file ends without a newline
117 warning(1012): parsing restarts here after previous syntax error
118 warning(1014): extra text after expected end of preprocessing directive         (breaks configure)
119 warning(1116): non-void function "poly_index_init" should return a value
120 warning(1172): subscript out of range
121 warning(1174): variable "j" was declared but never referenced
122 warning(1401): qualified name is not allowed in member declaration
123 warning(1460): function "..." redeclared "inline" after being called
124 warning(1551): variable "Altitude" is used before its value is set
125 warning(1552): variable "last" was set but never used
126
127 C++ only:
128 warning(3303): type qualifier on return type is meaningless
129 warning(3322): omission of explicit type is nonstandard ("int" assumed)
130
131
132 V. Additional Native SGI Irix Compilers Notes
133 =============================================
134
135 If you are building with native SGI compilers try running configure like the
136 following (assuming sh syntax):
137
138   CC=cc CXX=CC CFLAGS="-Xcpluscomm -woff 1014" ./configure
139
140 Then (and this step is *VERY* important for your success) run the following 
141 command:
142
143   find . -name Makefile -exec irix-hack.pl {} \;
144
145 This touches up the Makefiles to build libfoo.a with 
146
147   CC -ar -o libfoo.a file1.o file2.o ...
148
149 The traditional method is to run:
150
151   ar cru libfoo.a file1.o file2.o
152
153 I wonder if this means that the native SGI "ar" is somewhat broke?
154
155 Note, you should make sure you have perl installed on your system.  The
156 "irix-hack.pl" script assumes that perl is located in /usr/bin/perl so
157 if this isn't the proper location on your system, change it in the first
158 line of "irix-hack.pl" before running the above command.  One way to see
159 if perl is on your system (and determine where) is to run:
160
161   which perl
162
163 Perl can be installed from "eoe.sw.gifts_perl" or can be fetched and
164 built from the net.
165
166 Finally you should run Gnu make.  The native Irix make utility just
167 can't handle the makefiles generated by the automake program.  Thus 
168 you will need to use Gnu make.  It's called "gmake" on my system so I 
169 just run:
170
171   gmake
172
173 Don't worry about the make failing in the Tools directory.  That's all
174 under construction stuff right now (3/9/99) and if you get that far, 
175 rejoice because it means the simulator was successfully built in the 
176 Simulator/Main subdirectory.
177
178 Special note for those Irix users using the native compilers *AND* checking
179 out the current source tree via CVS:
180
181 You will need to run "aclocal ; automake -a ; autoconf" as per 
182 README.autoconf, but you need an additional flag for automake to disable
183 automatic dependency building (which breaks the native Irix compilers.)
184 You should instead run:
185
186     aclocal ; automake -a --include-deps; autoconf
187
188 Then, proceed on to the configure step.  
189
190 Questions?  I realize this section is a big heap of random information so
191 if something isn't quite working for you, please ask.