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