Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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