<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!--**************************************************************************** * * * Viewmol * * * * N O D E 4 . H T M L * * * * Copyright (c) Joerg-R. Hill, October 2003 * * * ******************************************************************************** *--> <html> <head> <title>4 Compilation</title> <META NAME="description" CONTENT="4 Compilation"> <META NAME="keywords" CONTENT="viewmol"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="STYLESHEET" href="viewmol.css"> <link rel="first" href="viewmol.html"> </head> <body> <H1><A NAME="SECTION000400000000000000000"> </A> <BR> 4 Compilation </H1> V<SMALL>IEWMOL</SMALL> 2.4.1 has been written in C. For compilation of V<SMALL>IEWMOL</SMALL> you need a C compiler. TIFF files are supported by the freely available TIFF library which is also necessary to compile the program. It can be found on many ftp sites, e. g. at <A NAME="tex2html14" HREF="ftp://ftp.remotesensing.org/pub/libtiff/"><TT>ftp://ftp.remotesensing.org/pub/libtiff/</TT></A>. PNG files are supported by the freely available PNG library which is also necessary to compile the program. It can be found at <A NAME="tex2html15" HREF="http://libpng.sourceforge.net/"><TT>http://libpng.sourceforge.net/</TT></A>. If you want to link V<SMALL>IEWMOL</SMALL> with Mesa instead of with OpenGL you will need Mesa (<A NAME="tex2html16" HREF="http://www.mesa3d.org/"><TT>http://www.mesa3d.org/</TT></A>). <P> Linux users need Motif to compile and run the program (if the program complains about ``<code>viewmol: can't load library 'libXm.so.1'</code>" Motif is missing). Motif is available from <A NAME="tex2html17" HREF="http://www.motifzone.org/download/"><TT>http://www.motifzone.org/download/</TT></A>. The Motif clone Lesstif (<A NAME="tex2html18" HREF="http://www.lesstif.org/"><TT>http://www.lesstif.org/</TT></A>) can be used with Viewmol starting with version 0.81. There are, however, some glitches with Lesstif (e. g. shortcuts don't work). <P> If you want to recompile the program and you are running one of the supported operating systems you may type <code>make</code>. The shell script <code>getmachine</code> determines the operating system you are running and sets some options for the compiler. If this does not work you should have a look into the <code>Makefile</code>. The options set are explained there. They are the following: <UL> <LI><code>OPT</code> <BR> The optimization flag for your compiler (on Linux <code>-O6 -mcpu=X</code> where <code>X</code> may be <code>pentium</code> or <code>pentiumpro</code>; <code>-O2</code> otherwise). </LI> <LI><code>CFLAGS</code> <BR> Additional flags for C compiler, used to handle special optimizations and some incompatibilities between different Unix versions. </LI> <LI><code>LDFLAGS</code> <BR> Additional flags needed for linker, currently only used for SGI to distinguish between different library versions. </LI> <LI><code>INCLUDE</code> <BR> The path to the include files. This is set to point to the include files for libtiff, libpng, and Python (the script asks the user for these paths at the beginning, there is really no need to change anything in the file here). </LI> <LI><code>LIBRARY</code> <BR> The path to the additional libraries required. These are libtiff, libpng, and the Python library (the script asks the user for these paths at the beginning, there is really no need to change anything in the file here). </LI> <LI><code>LIBS</code> <BR> The libraries needed to link V<SMALL>IEWMOL</SMALL>. They may differ between different operating systems. </LI> </UL> The <code>getmachine</code> shell script will ask you for the path names to the TIFF, PNG and Python libraries and to the include files necessary with these libraries. You may specify these path names using environment variables if you put the name of the variable in parentheses (e. g. <code>$(HOME)</code>). These path names are assigned to the <code>LIBTIFF</code>, <code>TIFFINCLUDE</code>, <code>LIBPNG</code>, <code>PNGINCLUDE</code>, <code>PYTHONINCLUDE</code>, and <code>LIBPYTHON</code> flags and stored in a file <code>.config.<OS></code> where <code><OS></code> is the output of the <code>uname -s</code> command on your machine. If this file already exists, <code>getmachine</code> does not ask for these path names. <P> Silicon Graphics compilers on 64-bit operating systems (IRIX64 - R8000, R10000, R12000) will produce a lot of warning messages concerning casts of pointers to integers. These can be safely ignored. <P> The make procedure will build the program in a directory whose name depends on the operating system and type of CPU you are using. You will find all executables in this directory. After compilation follow the steps under Installation to complete the installation. If you have compiled V<SMALL>IEWMOL</SMALL> yourself it is recommended that you use the included test scripts to ensure V<SMALL>IEWMOL</SMALL> is functioning correctly (cf. p. <A HREF="node34.html#testScripts"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="crossref.png"></A>). <P> <p><hr> <ADDRESS> <a href="mailto:joehill@users.sourceforge.net"><i>Jörg-Rüdiger Hill</i></a> Fri Oct 31 14:19:21 CET 2003 </ADDRESS> </BODY> </HTML>