
Building TDM
============

To build TDM you will need Maverik present (but not necessarily
installed) on your machine and the MAV_HOME environment variable set
to its location.

Untar the TDM distribution file which creates the directory
structure shown at the end of this document.

Move into the TDM directory and type "./setup" followed by
"make". This will compile the various TDM libraries.

The "setup" script generates a Makefile appropriate to your
machine. Currently supported platforms are Irix, GNU/Linux and
SunOS5. However, we believe that TDM itself should compile on any UNIX
platform, so, if you are using a different platform, edit the script,
fill in the appropriate values and mail us the amendments for
inclusion in the next release. Pre-2.0 versions of TDM has also been
used on Windows machines under Cygwin (some minor modification are
needed to TDM - in particular the serial port name and shared memory
clean up - plus the IPC add-on for Cygwin needs to be installed).

The setup script accepts the following command line options:

--help - prints a help message detailing these arguments.
--debug - to compile with "-g" rather than full optimization.
--SpaceBall - to specify that you want SpaceBall support (requires the
              SpaceWare SDK to be installed which unfortunately is no 
              longer available for download from SpaceTec's web site)
--SpaceWarePath - to specify where the SpaceWare SDK is installed if
                  not in /usr/SpaceWare.

After building the various TDM libraries, you will need to install
Maverik specifying the use and location of TDM. To do this:

1) Move into the Maverik distribution and execute the setup script
   specifying the location of where TDM is installed, e.g.

   ./setup --TDMPATH=/usr/local/TDM-2.2

2) type "make clean" if Maverik is already installed in order to remove
   the previous compilation.

3) type "make" to create the new Maverik libraries.

4) test by executing "tdm" in ${MAV_HOME}/examples/misc/TDM. You will
   need edit the tdm.c file and set the mav_opt_TDMLib variable to
   point to the TDM implementation you wish to use (the library is
   dynamically loaded when the TDM module initialises). For example: 

   mav_opt_TDMLib= "/usr/local/TDM-2.2/lib/libtdm-polhemus.so";

   Since the TDM library is dynamically loaded you may need to add its
   location to the LD_LIBRARY_PATH environment variable.

   See ${TDM_HOME}/src/README for a more info. Also ${TDM_HOME}/lib
   may need to be present in your LD_LIBRARY_PATH. See
   ${MAV_HOME}/examples/misc/README for the controls to this program.



Contents
========

 TDM-2.2
   |
   +-- bin
   |
   +-- doc
   |
   +-- incl
   |
   +-- lib
   |
   +-- src
        |
        +-- FOB
        |
        +-- InterTrax30
        |
        +-- Magellan
        |
        +-- Polhemus
        |
        +-- SpaceBall
        |
        +-- SpaceOrb360
        |
        +-- keys
        |
        +-- mouse
        |
        +-- skeleton
