blob: 5e8b047f31141be241ac41a75c3443975c8c570b [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>
43If you've obtained Mesa through CVS, do this to first:
44</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 Paulb0eee792003-03-16 16:43:04 +000048</pre>
Brian Paul0b27ace2003-03-08 17:38:57 +000049
Brian Paulb0eee792003-03-16 16:43:04 +000050<p>
Brian Paul5f37abf2003-09-05 14:47:07 +000051Now, just type <b>make</b>.
Brian Paul0b27ace2003-03-08 17:38:57 +000052You'll see a list of supported system configurations.
Brian Paul5f37abf2003-09-05 14:47:07 +000053Choose one from the list (such as linux-x86), and type:
54</p>
55<pre>
56 make linux-x86
57</pre>
58<p>
59That's it.
Brian Paul0b27ace2003-03-08 17:38:57 +000060</p>
61
Brian Paul5f37abf2003-09-05 14:47:07 +000062<h3>1.2 The libraries</h3>
63
64<p>
65When compilation has finished, look in the top-level <b>lib/</b> directory.
66You'll see a set of library files similar to this:
67</p>
68<pre>
69lrwxrwxrwx 1 brian users 10 Sep 4 17:55 libGL.so -> libGL.so.1*
70lrwxrwxrwx 1 brian users 19 Sep 4 17:55 libGL.so.1 -> libGL.so.1.4.050100*
71-rwxr-xr-x 1 brian users 13940317 Sep 4 17:55 libGL.so.1.4.050100*
72lrwxrwxrwx 1 brian users 11 Sep 4 17:54 libGLU.so -> libGLU.so.1*
73lrwxrwxrwx 1 brian users 20 Sep 4 17:54 libGLU.so.1 -> libGLU.so.1.3.050100*
74-rwxr-xr-x 1 brian users 324746 Sep 3 13:54 libGLU.so.1.1*
75-rwxr-xr-x 1 brian users 2830539 Sep 4 17:54 libGLU.so.1.3.050100*
76lrwxrwxrwx 1 brian users 12 Sep 4 17:53 libglut.so -> libglut.so.3*
77lrwxrwxrwx 1 brian users 16 Sep 4 17:53 libglut.so.3 -> libglut.so.3.7.1*
78-rwxr-xr-x 1 brian users 2426683 Sep 4 17:53 libglut.so.3.7.1*
79</pre>
80
81<p>
82<b>libGL</b> is the main OpenGL library (i.e. Mesa).
83<br>
84<b>libGLU</b> is the OpenGL Utility library.
85<br>
86<b>libglut</b> is the GLUT library.
87</p>
88
89
90<h3>1.3 Running the demos</h3>
91
92<p>
93If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or
94obtained Mesa from CVS, the <b>progs/</b> directory will contain a
95bunch of demonstration programs.
96</p>
97
98<p>
99Before running a demo, you may have to set an environment variable
100(such as <b>LD_LIBRARY_PATH</b> on Linux) to indicate where the
101libraries are located. For example:
102<p>
103<blockquote>
104<b>cd</b> into the Mesa <b>lib/</b> directory.
105<br>
106<b>setenv LD_LIBRARY_PATH ${cwd}</b> (if using csh or tcsh shell)
107<br>
108or,
109<br>
110<b>export LD_LIBRARY_PATH=${PWD}</b> (if using bash or sh shell)
111</blockquote>
112
113<p>
114Next, change to the Mesa/demos/ directory:
115</p>
116<blockquote>
117<b>cd ../progs/demos</b>
118</blockquote>
119
120<p>
121Run a demo such as gears:
122</p>
123<blockquote>
124<b>./gears</b>
125</blockquote>
126
127<p>
128If this doesn't work, try the <b>Mesa/progs/xdemos/glxinfo</b> program
129and see that it prints the expected Mesa version number.
130</p>
131
132<p>
133If you're using Linux or a similar OS, verify that the demo program is
134being linked with the proper library files:
135</p>
136<blockquote>
137<b>ldd gears</b>
138</blockquote>
139
140<p>
141You should see something like this:
142</p>
143<pre>
144 libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
145 libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
146 libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
147 libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
148 libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
149 libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
150 libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
151 libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
152 libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
153 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
154 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
155 libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
156 libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
157 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
158 libdl.so.2 => /lib/libdl.so.2 (0x40644000)
159 libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
160 libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
161</pre>
162
163<p>
164Retrace your steps if this doesn't look right.
165</p>
166
167
168<H3>1.4 Installing the header and library files</H3>
Brian Paul0b27ace2003-03-08 17:38:57 +0000169
170<p>
171The standard location for the OpenGL header files on Unix-type systems is
172in <code>/usr/include/GL/</code>.
173The standard location for the libraries is <code>/usr/lib/</code>.
174For more information see, the
175<a href="http://oss.sgi.com/projects/ogl-sample/ABI/" target="_parent">
176Linux/OpenGL ABI specification</a>.
177</p>
178
179<p>
180If you'd like Mesa to co-exist with another implementation of OpenGL that's
181already installed, you'll have to choose different directories, like
182<code>/usr/local/include/GL/</code> and <code>/usr/local/lib/</code>.
183</p>
184
185<p>
186To install the Mesa headers, do this:
Brian Paul5f37abf2003-09-05 14:47:07 +0000187<blockquote>
188<b>cp -r include/GL /usr/include</b>
189</blockquote>
Brian Paul0b27ace2003-03-08 17:38:57 +0000190
191<p>
192To install the Mesa libraries, do this:
193</p>
Brian Paul5f37abf2003-09-05 14:47:07 +0000194<blockquote>
195<b>cp -pd lib/* /usr/lib</b>
196<br>
197(The -pd options preserve symbolic links)
198</blockquote>
Brian Paul0b27ace2003-03-08 17:38:57 +0000199
200<p>
Brian Paul5f37abf2003-09-05 14:47:07 +0000201If you install the libraries in a non-standard location you can use
202LD_LIBRARY_PATH (on Linux) to switch between the Mesa libs and another
203vendor libs whenever you want.
204This is a handy way to compare multiple OpenGL implementations.
Brian Paul0b27ace2003-03-08 17:38:57 +0000205</p>
206
Brian Paul5f37abf2003-09-05 14:47:07 +0000207
208
209<a name="windows">
210<H2>2. Windows Compilation and Installation</H1>
211
212<p>
213Please see the <a href="README.WIN32">README.WIN32</a> file.
214</p>
215
216
217
218
219<a name="vms">
220<H2>3. VMS Compilation and Installation</H1>
221
222<p>
223Please see the <a href="README.VMS">README.VMS</a> file.
224</p>
225
226
227
228
229<a name="other">
230<H2>4. Other systems</H1>
231
232<p>
233Documentation for other environments (some may be very out of date):
234</p>
235
236<UL>
237<LI><A HREF="README.GGI">README.GGI</A> - GGI
238<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
239<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
240<LI><A HREF="README.BEOS">README.BEOS</A> - BeOS
241<LI><A HREF="README.D3D">README.D3D</A> - Direct3D driver
242<LI><A HREF="README.DJ">README.DJ</A> - DJGPP
243<LI><A HREF="README.LYNXOS">README.LYNXOS</A> - LynxOS
244<LI><A HREF="README.MINGW32">README.MINGW32</A> - Mingw32
245<LI><A HREF="README.NeXT">README.NeXT</A> - NeXT
246<LI><A HREF="README.OpenStep">README.OpenStep</A> - OpenStep
247<LI><A HREF="README.OS2">README.OS2</A> - OS/2
248<LI><A HREF="README.WINDML">README.WINDML</A> - WindML
249</UL>
250
251
252
253
Brian Paul0b27ace2003-03-08 17:38:57 +0000254</body>
255</html>