blob: 38644f481e6911bdd4addfe294cf572b08776f20 [file] [log] [blame]
Brian Paul0b27ace2003-03-08 17:38:57 +00001<HTML>
2
3<TITLE>Compilation and Installation</TITLE>
4
5<BODY text="#000000" bgcolor="#55bbff" link="#111188">
6
Brian Paul5f37abf2003-09-05 14:47:07 +00007
8<H1>Compilation and Installation</H1>
9
10<ol>
11<li><a href="#unix-x11">Unix / X11</a>
12<li><a href="#windows">Windows</a>
13<li><a href="#vms">VMS</a>
14<li><a href="#other">Other</a>
15</ol>
16
17
18
19<a name="unix-x11">
20<H2>1. Unix/X11 Compilation and Installation</H1>
Brian Paul0b27ace2003-03-08 17:38:57 +000021
22<p>
Brian Paul5f37abf2003-09-05 14:47:07 +000023Mesa uses a rather conventional Makefile system.
24A GNU autoconf/automake system used to be included, but was discarded
25in Mesa 5.1 because:
Brian Paul0b27ace2003-03-08 17:38:57 +000026</p>
Brian Paul0b27ace2003-03-08 17:38:57 +000027<ul>
Brian Paul5f37abf2003-09-05 14:47:07 +000028<li>It seldom worked on IRIX, Solaris, AIX, etc.
29<li>It was very compilicated
30<li>Nobody maintained it
31<li>libtool was just too weird
Brian Paul0b27ace2003-03-08 17:38:57 +000032</ul>
Brian Paulb0eee792003-03-16 16:43:04 +000033<p>
Brian Paul5f37abf2003-09-05 14:47:07 +000034If someone strongly feels that Mesa should have a autoconf/automake
35system and wants to contribute one and maintain it, we'll consider
36adding it again.
Brian Paulb0eee792003-03-16 16:43:04 +000037</p>
Brian Paul0b27ace2003-03-08 17:38:57 +000038
Brian Paul5f37abf2003-09-05 14:47:07 +000039
40<h3>1.1 Compilation</h3>
41
42<p>
Brian Pauld7af11a2004-01-07 14:51:30 +000043Note: if you've obtained Mesa through CVS, do this first:
Brian Paul5f37abf2003-09-05 14:47:07 +000044</p>
Brian Paulb0eee792003-03-16 16:43:04 +000045<pre>
Brian Paul5f37abf2003-09-05 14:47:07 +000046 cd Mesa-newtree
47 cp Makefile.X11 Makefile
Brian Paulf7650b62004-01-12 15:30:42 +000048 chmod a+x bin/mklib
Brian Paulb0eee792003-03-16 16:43:04 +000049</pre>
Brian Paul0b27ace2003-03-08 17:38:57 +000050
Brian Paulb0eee792003-03-16 16:43:04 +000051<p>
Brian Paul5f37abf2003-09-05 14:47:07 +000052Now, just type <b>make</b>.
Brian Paul0b27ace2003-03-08 17:38:57 +000053You'll see a list of supported system configurations.
Brian Paul5f37abf2003-09-05 14:47:07 +000054Choose one from the list (such as linux-x86), and type:
55</p>
56<pre>
57 make linux-x86
58</pre>
59<p>
60That's it.
Brian Paul0b27ace2003-03-08 17:38:57 +000061</p>
62
Brian Paul5f37abf2003-09-05 14:47:07 +000063<h3>1.2 The libraries</h3>
64
65<p>
66When compilation has finished, look in the top-level <b>lib/</b> directory.
67You'll see a set of library files similar to this:
68</p>
69<pre>
70lrwxrwxrwx 1 brian users 10 Sep 4 17:55 libGL.so -> libGL.so.1*
71lrwxrwxrwx 1 brian users 19 Sep 4 17:55 libGL.so.1 -> libGL.so.1.4.050100*
72-rwxr-xr-x 1 brian users 13940317 Sep 4 17:55 libGL.so.1.4.050100*
73lrwxrwxrwx 1 brian users 11 Sep 4 17:54 libGLU.so -> libGLU.so.1*
74lrwxrwxrwx 1 brian users 20 Sep 4 17:54 libGLU.so.1 -> libGLU.so.1.3.050100*
75-rwxr-xr-x 1 brian users 324746 Sep 3 13:54 libGLU.so.1.1*
76-rwxr-xr-x 1 brian users 2830539 Sep 4 17:54 libGLU.so.1.3.050100*
77lrwxrwxrwx 1 brian users 12 Sep 4 17:53 libglut.so -> libglut.so.3*
78lrwxrwxrwx 1 brian users 16 Sep 4 17:53 libglut.so.3 -> libglut.so.3.7.1*
79-rwxr-xr-x 1 brian users 2426683 Sep 4 17:53 libglut.so.3.7.1*
80</pre>
81
82<p>
83<b>libGL</b> is the main OpenGL library (i.e. Mesa).
84<br>
85<b>libGLU</b> is the OpenGL Utility library.
86<br>
87<b>libglut</b> is the GLUT library.
88</p>
89
90
91<h3>1.3 Running the demos</h3>
92
93<p>
94If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or
95obtained Mesa from CVS, the <b>progs/</b> directory will contain a
96bunch of demonstration programs.
97</p>
98
99<p>
100Before running a demo, you may have to set an environment variable
101(such as <b>LD_LIBRARY_PATH</b> on Linux) to indicate where the
102libraries are located. For example:
103<p>
104<blockquote>
105<b>cd</b> into the Mesa <b>lib/</b> directory.
106<br>
107<b>setenv LD_LIBRARY_PATH ${cwd}</b> (if using csh or tcsh shell)
108<br>
109or,
110<br>
111<b>export LD_LIBRARY_PATH=${PWD}</b> (if using bash or sh shell)
112</blockquote>
113
114<p>
115Next, change to the Mesa/demos/ directory:
116</p>
117<blockquote>
118<b>cd ../progs/demos</b>
119</blockquote>
120
121<p>
122Run a demo such as gears:
123</p>
124<blockquote>
125<b>./gears</b>
126</blockquote>
127
128<p>
129If this doesn't work, try the <b>Mesa/progs/xdemos/glxinfo</b> program
130and see that it prints the expected Mesa version number.
131</p>
132
133<p>
134If you're using Linux or a similar OS, verify that the demo program is
135being linked with the proper library files:
136</p>
137<blockquote>
138<b>ldd gears</b>
139</blockquote>
140
141<p>
142You should see something like this:
143</p>
144<pre>
145 libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
146 libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
147 libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
148 libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
149 libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
150 libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
151 libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
152 libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
153 libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
154 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
155 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
156 libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
157 libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
158 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
159 libdl.so.2 => /lib/libdl.so.2 (0x40644000)
160 libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
161 libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
162</pre>
163
164<p>
165Retrace your steps if this doesn't look right.
166</p>
167
168
169<H3>1.4 Installing the header and library files</H3>
Brian Paul0b27ace2003-03-08 17:38:57 +0000170
171<p>
172The standard location for the OpenGL header files on Unix-type systems is
173in <code>/usr/include/GL/</code>.
174The standard location for the libraries is <code>/usr/lib/</code>.
175For more information see, the
176<a href="http://oss.sgi.com/projects/ogl-sample/ABI/" target="_parent">
177Linux/OpenGL ABI specification</a>.
178</p>
179
180<p>
181If you'd like Mesa to co-exist with another implementation of OpenGL that's
182already installed, you'll have to choose different directories, like
183<code>/usr/local/include/GL/</code> and <code>/usr/local/lib/</code>.
184</p>
185
186<p>
187To install the Mesa headers, do this:
Brian Paul5f37abf2003-09-05 14:47:07 +0000188<blockquote>
189<b>cp -r include/GL /usr/include</b>
190</blockquote>
Brian Paul0b27ace2003-03-08 17:38:57 +0000191
192<p>
193To install the Mesa libraries, do this:
194</p>
Brian Paul5f37abf2003-09-05 14:47:07 +0000195<blockquote>
196<b>cp -pd lib/* /usr/lib</b>
197<br>
198(The -pd options preserve symbolic links)
199</blockquote>
Brian Paul0b27ace2003-03-08 17:38:57 +0000200
201<p>
Brian Paul5f37abf2003-09-05 14:47:07 +0000202If you install the libraries in a non-standard location you can use
203LD_LIBRARY_PATH (on Linux) to switch between the Mesa libs and another
204vendor libs whenever you want.
205This is a handy way to compare multiple OpenGL implementations.
Brian Paul0b27ace2003-03-08 17:38:57 +0000206</p>
207
Brian Paul5f37abf2003-09-05 14:47:07 +0000208
209
210<a name="windows">
211<H2>2. Windows Compilation and Installation</H1>
212
213<p>
214Please see the <a href="README.WIN32">README.WIN32</a> file.
215</p>
216
217
218
219
220<a name="vms">
221<H2>3. VMS Compilation and Installation</H1>
222
223<p>
224Please see the <a href="README.VMS">README.VMS</a> file.
225</p>
226
227
228
229
230<a name="other">
231<H2>4. Other systems</H1>
232
233<p>
234Documentation for other environments (some may be very out of date):
235</p>
236
237<UL>
238<LI><A HREF="README.GGI">README.GGI</A> - GGI
239<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
240<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
241<LI><A HREF="README.BEOS">README.BEOS</A> - BeOS
242<LI><A HREF="README.D3D">README.D3D</A> - Direct3D driver
243<LI><A HREF="README.DJ">README.DJ</A> - DJGPP
244<LI><A HREF="README.LYNXOS">README.LYNXOS</A> - LynxOS
245<LI><A HREF="README.MINGW32">README.MINGW32</A> - Mingw32
246<LI><A HREF="README.NeXT">README.NeXT</A> - NeXT
247<LI><A HREF="README.OpenStep">README.OpenStep</A> - OpenStep
248<LI><A HREF="README.OS2">README.OS2</A> - OS/2
249<LI><A HREF="README.WINDML">README.WINDML</A> - WindML
250</UL>
251
252
253
254
Brian Paul0b27ace2003-03-08 17:38:57 +0000255</body>
256</html>