X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Finstall.html;h=e1018119a766bf74b03f6903f3db64509c5c15fa;hb=c108a3f863c44b5e9760d4668148ef8ca7557b2f;hp=d2ad3ea0a1eecb77108adc96886a4d597f4e701d;hpb=26f334a679dcb09c1217d34e89e98ac44471c094;p=mesa.git diff --git a/docs/install.html b/docs/install.html index d2ad3ea0a1e..e1018119a76 100644 --- a/docs/install.html +++ b/docs/install.html @@ -1,79 +1,150 @@ -Compilation and Installation +Compiling and Installing - + + -

Compilation and Installation

+ +

Compiling and Installing

  1. Unix / X11 +
  2. Windows -
  3. VMS +
  4. Building with SCons
  5. Other
- +

1. Unix/X11 Compilation and Installation

+ +
+

1.1 General prerequisites for building

+ + + + +
+

1.2 Prerequisites for DRI and hardware acceleration

+

-Mesa uses a rather conventional Makefile system. -A GNU autoconf/automake system used to be included, but was discarded -in Mesa 5.1 because: +The following are required for DRI-based hardware acceleration with Mesa:

+
-

-If someone strongly feels that Mesa should have a autoconf/automake -system and wants to contribute one and maintain it, we'll consider -adding it again.

+ + +

1.3 Building with Autoconf

+

-In Mesa 6.1 we modified the conventional Makefile system. -Instead of specifying all the various system configurations in the -Make-config file, there's a directory named configs/ which -has an individual file for each configuration. -One of the configs gets copied to configs/current, which -is then included by all Makefiles. -

+Mesa may be
built using autoconf. +This should work well on most GNU-based systems. +If that fails the traditional Mesa build system is available. -

1.1 Compilation

+ + +

1.4 Building with traditional Makefiles

-Note: if you've obtained Mesa through CVS, do this first: +The traditional Mesa build system is based on a collection of pre-defined +system configurations. +

+

+To see the list of configurations, just type make. +Then choose a configuration from the list and type make +configname.

-
-    cd Mesa
-    chmod a+x bin/mklib
-

-Just type make in the top-level directory. +Mesa may be built in several different ways using the predefined configurations: +

+ + +

-If you want to rebuild for a different configuration run +Later, if you want to rebuild for a different configuration run make realclean before rebuilding.

-

1.2 The libraries

+
+

1.5 The libraries

-When compilation has finished, look in the top-level lib/ directory. +When compilation has finished, look in the top-level lib/ +(or lib64/) directory. You'll see a set of library files similar to this:

@@ -106,86 +177,37 @@ lrwxrwxrwx    1 brian    users          23 Mar 26 07:53 libOSMesa.so.6 -> libOSM
 libOSMesa is the OSMesa (Off-Screen) interface library.
 

- -

1.3 Running the demos

-

-If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or -obtained Mesa from CVS, the progs/ directory will contain a -bunch of demonstration programs. -

- -

-Before running a demo, you may have to set an environment variable -(such as LD_LIBRARY_PATH on Linux) to indicate where the -libraries are located. For example: -

-

-cd into the Mesa lib/ directory. -
-setenv LD_LIBRARY_PATH ${cwd} (if using csh or tcsh shell) -
-or, -
-export LD_LIBRARY_PATH=${PWD} (if using bash or sh shell) -
- -

-Next, change to the Mesa/demos/ directory: -

-
-cd ../progs/demos -
- -

-Run a demo such as gears: -

-
-./gears -
- -

-If this doesn't work, try the Mesa/progs/xdemos/glxinfo program -and see that it prints the expected Mesa version number. -

- -

-If you're using Linux or a similar OS, verify that the demo program is -being linked with the proper library files: -

-
-ldd gears -
- -

-You should see something like this: +If you built the DRI hardware drivers, you'll also see the DRI drivers:

-        libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
-        libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
-        libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
-        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
-        libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
-        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
-        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
-        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
-        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
-        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
-        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
-        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
-        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
-        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
-        libdl.so.2 => /lib/libdl.so.2 (0x40644000)
-        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
-        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
+-rwxr-xr-x   1 brian users 15607851 Jul 21 12:11 ffb_dri.so
+-rwxr-xr-x   1 brian users 15148747 Jul 21 12:11 i810_dri.so
+-rwxr-xr-x   1 brian users 14497814 Jul 21 12:11 i830_dri.so
+-rwxr-xr-x   1 brian users 16895413 Jul 21 12:11 i915_dri.so
+-rwxr-xr-x   1 brian users 11320803 Jul 21 12:11 mach64_dri.so
+-rwxr-xr-x   1 brian users 11418014 Jul 21 12:12 mga_dri.so
+-rwxr-xr-x   1 brian users 11064426 Jul 21 12:12 r128_dri.so
+-rwxr-xr-x   1 brian users 11849858 Jul 21 12:12 r200_dri.so
+-rwxr-xr-x   1 brian users 16050488 Jul 21 12:11 r300_dri.so
+-rwxr-xr-x   1 brian users 11757388 Jul 21 12:12 radeon_dri.so
+-rwxr-xr-x   1 brian users 11232304 Jul 21 12:13 s3v_dri.so
+-rwxr-xr-x   1 brian users 11062970 Jul 21 12:13 savage_dri.so
+-rwxr-xr-x   1 brian users 11214212 Jul 21 12:13 sis_dri.so
+-rwxr-xr-x   1 brian users 11368736 Jul 21 12:13 tdfx_dri.so
+-rwxr-xr-x   1 brian users 10598868 Jul 21 12:13 trident_dri.so
+-rwxr-xr-x   1 brian users 10997120 Jul 21 12:13 unichrome_dri.so
 

-Retrace your steps if this doesn't look right. +If you built with Gallium support, look in lib/gallium/ for Gallium-based +versions of libGL and device drivers.

-

1.4 Installing the header and library files

+ +
+

1.6 Installing the header and library files

The standard location for the OpenGL header files on Unix-type systems is @@ -203,37 +225,94 @@ already installed, you'll have to choose different directories, like

-To install Mesa's headers and libraries, run make install -You'll be prompted to enter alternative directories for the headers -and libraries. +To install Mesa's headers and libraries, run make install. +But first, check the Mesa/configs/default file and examine the values +of the INSTALL_DIR and DRI_DRIVER_INSTALL_DIR variables. +Change them if needed, then run make install. +

+ +

+The variable +DESTDIR may also be used to install the contents to a temporary +staging directory. +This can be useful for package management. +For example: make install DESTDIR=/somepath/

-Note: at runtime, you can set the LD_LIBRARY_PATH (on Linux) to switch -between the Mesa libs and another vendor libs whenever you want. +Note: at runtime you can use the LD_LIBRARY_PATH environment variable +(on Linux at least) to switch +between the Mesa libraries and other vendor's libraries whenever you want. This is a handy way to compare multiple OpenGL implementations.

+
+

1.7 Building OpenGL programs with pkg-config

+ +

+Running make install will install package configuration files +for the pkg-config utility. +

+ +

+When compiling your OpenGL application you can use pkg-config to determine +the proper compiler and linker flags. +

+ +

+For example, compiling and linking a GLUT application can be done with: +

+
+   gcc `pkg-config --cflags --libs glut` mydemo.c -o mydemo
+
+ +

2. Windows Compilation and Installation

-Please see the README.WIN32 file. +Please see the instructions on building with SCons.

- - -

3. VMS Compilation and Installation

+
+

3. Building with SCons

-Please see the README.VMS file. +To build Mesa with SCons on Linux or Windows do +

+
+    scons
+
+

+The build output will be placed in +build/platform-machine-debug/..., where platform is for +example linux or windows, machine is x86 or x86_64, optionally followed +by -debug for debug builds.

- +

+To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do +

+
+    scons platform=windows toolchain=crossmingw machine=x86 statetrackers=mesa drivers=softpipe,trace winsys=gdi
+
+

+This will create: +

+ +

+Put them all in the same directory to test them. +

@@ -244,6 +323,7 @@ Documentation for other environments (some may be very out of date):