blob: a0962cc32a2c6635938d600cdb5c7403b074b1c6 [file] [log] [blame]
Brian Paul0b27ace2003-03-08 17:38:57 +00001<HTML>
2
3<TITLE>Compilation and Installation</TITLE>
4
Brian Paul36da0452005-01-20 03:55:10 +00005<link rel="stylesheet" type="text/css" href="mesa.css"></head>
6
7<BODY>
Brian Paul0b27ace2003-03-08 17:38:57 +00008
Brian Paul5f37abf2003-09-05 14:47:07 +00009
10<H1>Compilation and Installation</H1>
11
12<ol>
13<li><a href="#unix-x11">Unix / X11</a>
14<li><a href="#windows">Windows</a>
15<li><a href="#vms">VMS</a>
16<li><a href="#other">Other</a>
17</ol>
18
19
20
21<a name="unix-x11">
22<H2>1. Unix/X11 Compilation and Installation</H1>
Brian Paul0b27ace2003-03-08 17:38:57 +000023
24<p>
Brian Paul5f37abf2003-09-05 14:47:07 +000025Mesa uses a rather conventional Makefile system.
26A GNU autoconf/automake system used to be included, but was discarded
27in Mesa 5.1 because:
Brian Paul0b27ace2003-03-08 17:38:57 +000028</p>
Brian Paul0b27ace2003-03-08 17:38:57 +000029<ul>
Brian Paul5f37abf2003-09-05 14:47:07 +000030<li>It seldom worked on IRIX, Solaris, AIX, etc.
31<li>It was very compilicated
32<li>Nobody maintained it
33<li>libtool was just too weird
Brian Paul0b27ace2003-03-08 17:38:57 +000034</ul>
Brian Paulb0eee792003-03-16 16:43:04 +000035<p>
Brian Paul5f37abf2003-09-05 14:47:07 +000036If someone strongly feels that Mesa should have a autoconf/automake
37system and wants to contribute one and maintain it, we'll consider
38adding it again.
Brian Paulb0eee792003-03-16 16:43:04 +000039</p>
Brian Paul0b27ace2003-03-08 17:38:57 +000040
Brian Paul26f334a2004-03-26 15:20:08 +000041<p>
42In Mesa 6.1 we modified the conventional Makefile system.
43Instead of specifying all the various system configurations in the
44Make-config file, there's a directory named <code>configs/</code> which
45has an individual file for each configuration.
46One of the configs gets copied to <code>configs/current</code>, which
47is then included by all Makefiles.
48</p>
49
Brian Paul5f37abf2003-09-05 14:47:07 +000050
51<h3>1.1 Compilation</h3>
52
53<p>
Brian Pauld7af11a2004-01-07 14:51:30 +000054Note: if you've obtained Mesa through CVS, do this first:
Brian Paul5f37abf2003-09-05 14:47:07 +000055</p>
Brian Paulb0eee792003-03-16 16:43:04 +000056<pre>
Brian Paul26f334a2004-03-26 15:20:08 +000057 cd Mesa
Brian Paulf7650b62004-01-12 15:30:42 +000058 chmod a+x bin/mklib
Brian Paulb0eee792003-03-16 16:43:04 +000059</pre>
Brian Paul0b27ace2003-03-08 17:38:57 +000060
Brian Paulb0eee792003-03-16 16:43:04 +000061<p>
Brian Paul26f334a2004-03-26 15:20:08 +000062Just type <b>make</b> in the top-level directory.
Brian Paul0b27ace2003-03-08 17:38:57 +000063You'll see a list of supported system configurations.
Brian Paul5f37abf2003-09-05 14:47:07 +000064Choose one from the list (such as linux-x86), and type:
65</p>
66<pre>
67 make linux-x86
68</pre>
69<p>
Brian Paul26f334a2004-03-26 15:20:08 +000070If you want to rebuild for a different configuration run
71<code>make realclean</code> before rebuilding.
Brian Paul0b27ace2003-03-08 17:38:57 +000072</p>
73
Brian Paul26f334a2004-03-26 15:20:08 +000074
Brian Paul5f37abf2003-09-05 14:47:07 +000075<h3>1.2 The libraries</h3>
76
77<p>
78When compilation has finished, look in the top-level <b>lib/</b> directory.
79You'll see a set of library files similar to this:
80</p>
81<pre>
Brian Paul26f334a2004-03-26 15:20:08 +000082lrwxrwxrwx 1 brian users 10 Mar 26 07:53 libGL.so -> libGL.so.1*
83lrwxrwxrwx 1 brian users 19 Mar 26 07:53 libGL.so.1 -> libGL.so.1.5.060100*
84-rwxr-xr-x 1 brian users 3375861 Mar 26 07:53 libGL.so.1.5.060100*
85lrwxrwxrwx 1 brian users 11 Mar 26 07:53 libGLU.so -> libGLU.so.1*
86lrwxrwxrwx 1 brian users 20 Mar 26 07:53 libGLU.so.1 -> libGLU.so.1.3.060100*
87-rwxr-xr-x 1 brian users 549269 Mar 26 07:53 libGLU.so.1.3.060100*
88lrwxrwxrwx 1 brian users 12 Mar 26 07:53 libglut.so -> libglut.so.3*
89lrwxrwxrwx 1 brian users 16 Mar 26 07:53 libglut.so.3 -> libglut.so.3.7.1*
90-rwxr-xr-x 1 brian users 597754 Mar 26 07:53 libglut.so.3.7.1*
91lrwxrwxrwx 1 brian users 11 Mar 26 08:04 libGLw.so -> libGLw.so.1*
92lrwxrwxrwx 1 brian users 15 Mar 26 08:04 libGLw.so.1 -> libGLw.so.1.0.0*
93-rwxr-xr-x 1 brian users 20750 Mar 26 08:04 libGLw.so.1.0.0*
94lrwxrwxrwx 1 brian users 14 Mar 26 07:53 libOSMesa.so -> libOSMesa.so.6*
95lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSMesa.so.6.1.060100*
96-rwxr-xr-x 1 brian users 23871 Mar 26 07:53 libOSMesa.so.6.1.060100*
Brian Paul5f37abf2003-09-05 14:47:07 +000097</pre>
98
99<p>
100<b>libGL</b> is the main OpenGL library (i.e. Mesa).
101<br>
102<b>libGLU</b> is the OpenGL Utility library.
103<br>
104<b>libglut</b> is the GLUT library.
Brian Paul26f334a2004-03-26 15:20:08 +0000105<br>
106<b>libGLw</b> is the Xt/Motif OpenGL drawing area widget library.
107<br>
108<b>libOSMesa</b> is the OSMesa (Off-Screen) interface library.
Brian Paul5f37abf2003-09-05 14:47:07 +0000109</p>
110
111
112<h3>1.3 Running the demos</h3>
113
114<p>
115If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or
116obtained Mesa from CVS, the <b>progs/</b> directory will contain a
117bunch of demonstration programs.
118</p>
119
120<p>
121Before running a demo, you may have to set an environment variable
122(such as <b>LD_LIBRARY_PATH</b> on Linux) to indicate where the
123libraries are located. For example:
124<p>
125<blockquote>
126<b>cd</b> into the Mesa <b>lib/</b> directory.
127<br>
128<b>setenv LD_LIBRARY_PATH ${cwd}</b> (if using csh or tcsh shell)
129<br>
130or,
131<br>
132<b>export LD_LIBRARY_PATH=${PWD}</b> (if using bash or sh shell)
133</blockquote>
134
135<p>
136Next, change to the Mesa/demos/ directory:
137</p>
138<blockquote>
139<b>cd ../progs/demos</b>
140</blockquote>
141
142<p>
143Run a demo such as gears:
144</p>
145<blockquote>
146<b>./gears</b>
147</blockquote>
148
149<p>
150If this doesn't work, try the <b>Mesa/progs/xdemos/glxinfo</b> program
151and see that it prints the expected Mesa version number.
152</p>
153
154<p>
155If you're using Linux or a similar OS, verify that the demo program is
156being linked with the proper library files:
157</p>
158<blockquote>
159<b>ldd gears</b>
160</blockquote>
161
162<p>
163You should see something like this:
164</p>
165<pre>
166 libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
167 libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
168 libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
169 libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
170 libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
171 libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
172 libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
173 libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
174 libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
175 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
176 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
177 libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
178 libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
179 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
180 libdl.so.2 => /lib/libdl.so.2 (0x40644000)
181 libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
182 libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
183</pre>
184
185<p>
186Retrace your steps if this doesn't look right.
187</p>
188
189
190<H3>1.4 Installing the header and library files</H3>
Brian Paul0b27ace2003-03-08 17:38:57 +0000191
192<p>
193The standard location for the OpenGL header files on Unix-type systems is
194in <code>/usr/include/GL/</code>.
195The standard location for the libraries is <code>/usr/lib/</code>.
196For more information see, the
197<a href="http://oss.sgi.com/projects/ogl-sample/ABI/" target="_parent">
198Linux/OpenGL ABI specification</a>.
199</p>
200
201<p>
202If you'd like Mesa to co-exist with another implementation of OpenGL that's
203already installed, you'll have to choose different directories, like
204<code>/usr/local/include/GL/</code> and <code>/usr/local/lib/</code>.
205</p>
206
207<p>
Brian Paul26f334a2004-03-26 15:20:08 +0000208To install Mesa's headers and libraries, run <code>make install</code>
209You'll be prompted to enter alternative directories for the headers
210and libraries.
Brian Paul0b27ace2003-03-08 17:38:57 +0000211</p>
Brian Paul0b27ace2003-03-08 17:38:57 +0000212
213<p>
Brian Paul26f334a2004-03-26 15:20:08 +0000214Note: at runtime, you can set the LD_LIBRARY_PATH (on Linux) to switch
215between the Mesa libs and another vendor libs whenever you want.
Brian Paul5f37abf2003-09-05 14:47:07 +0000216This is a handy way to compare multiple OpenGL implementations.
Brian Paul0b27ace2003-03-08 17:38:57 +0000217</p>
218
Brian Paul5f37abf2003-09-05 14:47:07 +0000219
220
221<a name="windows">
222<H2>2. Windows Compilation and Installation</H1>
223
224<p>
225Please see the <a href="README.WIN32">README.WIN32</a> file.
226</p>
227
228
229
230
231<a name="vms">
232<H2>3. VMS Compilation and Installation</H1>
233
234<p>
235Please see the <a href="README.VMS">README.VMS</a> file.
236</p>
237
238
239
240
241<a name="other">
242<H2>4. Other systems</H1>
243
244<p>
245Documentation for other environments (some may be very out of date):
246</p>
247
248<UL>
249<LI><A HREF="README.GGI">README.GGI</A> - GGI
250<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
251<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
252<LI><A HREF="README.BEOS">README.BEOS</A> - BeOS
253<LI><A HREF="README.D3D">README.D3D</A> - Direct3D driver
254<LI><A HREF="README.DJ">README.DJ</A> - DJGPP
255<LI><A HREF="README.LYNXOS">README.LYNXOS</A> - LynxOS
256<LI><A HREF="README.MINGW32">README.MINGW32</A> - Mingw32
257<LI><A HREF="README.NeXT">README.NeXT</A> - NeXT
258<LI><A HREF="README.OpenStep">README.OpenStep</A> - OpenStep
259<LI><A HREF="README.OS2">README.OS2</A> - OS/2
260<LI><A HREF="README.WINDML">README.WINDML</A> - WindML
261</UL>
262
263
264
265
Brian Paul0b27ace2003-03-08 17:38:57 +0000266</body>
267</html>