From: Timothy A. <t_a...@ya...> - 2012-05-29 07:13:50
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>Building glean for GNU/Linux</title> <meta name="description" content="building glean for GNU/Linux"> <meta name="author" content="Allen Akin"> <link rev="made" href="mailto:ak...@po..."> </head> <body topmargin="10" bottommargin="10" leftmargin="10" rightmargin="10" marginheight="0" marginwidth="0" bgcolor="#FFFFFF"> <h1>Building <i>glean</i> for GNU/Linux</h1> <p> The present versions of <i>glean</i> Makefiles depend on features of GNU make. (In particular, the automatic re-scanning of all dependency files after any have changed.) If your version of make is known to be significantly incompatible with GNU make, then you will need to acquire a copy of GNU make or modify <i>glean</i>'s Makefiles. </p><p> <i>glean</i> makes extensive use of the C++ Standard Template Library. If your C++ compiler fails to compile <i>glean</i>, you may want to try <a href="http://gcc.gnu.org/">the latest version of gcc</a>. <i>glean</i> was originally developed with egcs 1.1.2; earlier versions are missing some features that <i>glean</i> uses, such as namespaces. </p><h2>Obtain the source code</h2> <p> Obtain the full source tree from the <a href="http://sourceforge.net/scm/?type=git&group_id=430">read-only GIT access page on SourceForge</a>. </p><p> Go to a directory where you want to checkout Glean and run the git command: <PRE> git clone git://glean.git.sourceforge.net/gitroot/glean/glean </PRE> This will create a new sub directory 'glean' containing the Glean source. </p> <h2>Set the GLEAN_ROOT environment variable</h2> <p> To compile or run <i>glean</i>, you will need to set the environment variable <kbd>GLEAN_ROOT</kbd> to the full pathname of the <i>glean</i> source directory. If you're following along, this is the glean directory created by the git clone, so first:</p> <pre> cd glean </pre> and this command should do the trick for users of csh and its descendants: </p><pre> setenv GLEAN_ROOT `pwd` </pre> and this command should work for users of sh and its descendants: <pre> GLEAN_ROOT=`pwd`; export GLEAN_ROOT </pre> Be sure to set the environment variable each time you want to compile or run <i>glean</i>. Perhaps the easiest way to do this is to set it in your shell's startup script. <h2>Set Makefile options</h2> <p> Edit $GLEAN_ROOT/make/common.mak and modify the configuration variables according to your preferences. Some of the variables that are most likely to need customization are: </p><dl> <dt>CONFIG</dt> <dd> This variable selects the operating system and window system for which <i>glean</i> will be compiled. The OS option must be either __UNIX__ or __MS__. The window-system option must be either __X11__ or __WIN__. (Yes, there is some ambiguity between the OS and the window system in Microsoft's case. However, there are X11 products that run under Windows, so the combination of __MS__ and __X11__ is possible.) By default, this variable is set to "-D__UNIX__ -D__X11__". </dd> <dt>CC</dt> <dd> This variable specifies the location of the C++ compiler. By default it is "g++". </dd> <dt>XINC, GLINC, GLUTINC, TIFFINC</dt> <dd> These variables specify the directories containing include files for X, OpenGL, GLUT, and libtiff, respectively. The defaults are /usr/include/X11, /usr/local/include, /usr/local/include, and /usr/include, respectively. </dd> <dt>XLIB, GLLIB, GLUTLIB, TIFFLIB</dt> <dd> These variables specify the directories containing libraries (libX11, libGL, libglut, and libtiff, respectively). The defaults are /usr/X11R6/lib, /usr/local/lib, /usr/local/lib, and /usr/lib, respectively. </dd> <dt>_INC, _OPT, _DBG, _WARN, _LIBDIR, _LIB, _PROF</dt> <dd> These variables define C++ command-line options for include-file directories, optimization, debugging, warnings, library directories, libraries, and profiling. These apply universally, to all <i>glean</i> compilations. Individual Makefiles can make local additions to these defaults by defining corresponding variables whose names do not have a leading underscore. Note that it is possible to configure your system so that the <i>order</i> of include-file or library-file directories is significant; for example, by having two versions of the same include file, one in /usr/include and one in /usr/local/include. In such cases, you'll need to make sure that the _INC and _LIB variables specify directories in precisely the order you require. </dd> </dl> <h2>Build <i>glean</i></h2> <p> When you've finished editing the Makefile, simply type </p><pre> cd src make install </pre> This will build <i>glean</i> and the other tools in the suite, and install everything in <kbd>$GLEAN_ROOT/bin</kbd>, <kbd>$GLEAN_ROOT/include</kbd>, and <kbd>$GLEAN_ROOT/lib</kbd>. Nothing will be altered outside the <kbd>$GLEAN_ROOT</kbd> directory hierarchy. <p> Note that you <b>must</b> use <kbd>make install</kbd> rather than plain <kbd>make</kbd>, otherwise the headers and libraries won't be copied to <kbd>$GLEAN_ROOT</kbd> and subsequent components will fail to build. </p><hr> <small> <ul type="DISC"> <li> <a href="http://glean.sourceforge.net/index.html"><i>glean</i> home</a> </li><li> <a href="http://glean.sourceforge.net/whatis.html">What is <i>glean</i>?</a> </li><li> <a href="http://glean.sourceforge.net/build.html">How do I build <i>glean</i>?</a> </li><li> <a href="http://glean.sourceforge.net/run.html">How do I run <i>glean</i>?</a> </li><li> <a href="http://glean.sourceforge.net/next.html">Where do we go from here?</a> <ul type="CIRCLE"> <li> <a href="http://glean.sourceforge.net/newtest.html">Adding new tests</a> </li><li> <a href="http://glean.sourceforge.net/newfeat.html">Adding new infrastructure features</a> </li><li> <a href="http://glean.sourceforge.net/overview.html">Overview of <i>glean</i> internals</a> </li><li> <a href="http://glean.sourceforge.net/repo.html">Creating a repository of results</a> </li><li> <a href="http://glean.sourceforge.net/port.html">Porting <i>glean</i></a> </li><li> <a href="http://glean.sourceforge.net/cleanup.html">Cleaning up loose ends</a> </li></ul> </li><li> <a href="http://glean.sourceforge.net/changes.html">What has changed recently?</a> </li></ul> </small> </body></html> |