Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 965e33040dd61030a94f0eb89877aee8 > files > 4123

howto-html-en-20080722-2mdv2010.1.noarch.rpm

<HTML
><HEAD
><TITLE
>Install GLUT 3.7 Distribution (optional)</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="Nvidia OpenGL Configuration mini-HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Install Software"
HREF="install.html"><LINK
REL="PREVIOUS"
TITLE="Install Qt"
HREF="instqt.html"><LINK
REL="NEXT"
TITLE="Install Java 3D (optional)"
HREF="instjava.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Nvidia OpenGL Configuration mini-HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="instqt.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Install Software</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="instjava.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="INSTGLUT"
>3.6. Install GLUT 3.7 Distribution (optional)</A
></H1
><P
>        If you installed the MesaDemos/MesaLib package, then you
        have already installed GLUT 3.7 since it is included with MesaDemos.
        However, you may be interested in installing the GLUT manpages and you
        can skip right to the "Install GLUT manual pages", below ...
        </P
><P
>	Installing GLUT is a bit tricky.  I'm not too familiar with <B
CLASS="COMMAND"
>imake</B
>, the
	program that it uses to manage the Makefiles, and didn't quite see how to
	get GLUT to install to where I wanted it
	(<TT
CLASS="FILENAME"
>/usr/lib</TT
>, but MesaDemos will do this
        without any trouble though).  It can be done manually anyhow:
	</P
><P
>	<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>&#13;	cd /usr/src
	tar -xvzf glut-3.7.tar.gz
	cd glut-3.7

	Read the file: README.linux
	cd linux
	READ the file: README
	cp Glut.cf ..
	cd ..
	Edit Glut.cf: remove any Mesa references.
	Replace any -lMesaGL -lMesaGLU with -lGL -lGLU if needed.
	In particular, replace:
		OPENGL = $(TOP)/../lib/libMesaGL.so
		GLU = $(TOP)/../lib/libMesaGLU.so
	with:
		OPENGL = -lGL
		GLU = -lGLU

	./mkmkfiles.imake
	cd lib/glut
	cp /usr/src/glut-3.7/linux/Makefile .
	Edit the Makefile: remove any Mesa references.
	Replace any -lMesaGL -lMesaGLU with -lGL -lGLU if needed.
	In particular, replace:
		OPENGL = $(TOP)/../lib/libMesaGL.so
		GLU = $(TOP)/../lib/libMesaGLU.so
	with:
		OPENGL = -lGL
		GLU = -lGLU

	make
	ln -s libglut.so.3.7 libglut.so
	ln -s libglut.so.3.7 libglut.so.3
	cp -d libglut.* /usr/lib
	cd ..
	cd gle
	# make a shared lib for libgle
	make
	gcc -shared -o libgle.so.3.7 *.o
	ln -s libgle.so.3.7 libgle.so
	ln -s libgle.so.3.7 libgle.so.3
	cp -d libgle.* /usr/lib
	cd ..
	cd mui
	# make a shared lib for libmui
	make
	gcc -shared -o libmui.so.3.7 *.o
	ln -s libmui.so.3.7 libmui.so
	ln -s libmui.so.3.7 libmui.so.3
	cp -d libmui.* /usr/lib

        # Install the GLUT manual pages (not included with MesaDemos)
	cd /usr/src/glut-3.7
	make SUBDIRS=man Makefile
	cd man/glut
	make install.man
	ldconfig

	cd ../../progs/demos/ideas
	# edit the Makefile, change OPENGL = -lGL and GLU = -lGLU
	make
	./ideas
	# test compiling some demos
	# take a look at which libraries have to be linked (-lX11 ...) in
	# the Makefiles.  Qt's tmake program available at www.troll.no
	# is a quick way to make a Makefile but you have to edit it
	# and add the -l needed.
	</PRE
></FONT
></TD
></TR
></TABLE
>
	</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="instqt.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="instjava.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Install Qt</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="install.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Install Java 3D (optional)</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>