Chapter 6. Compiling VR Juggler

Table of Contents

General Quick Start
Targets
Useful Variables
GNU Make Options
Process of Building (Individual Steps)
Developer Installation

To improve portability and consistency across platforms, VR Juggler uses GNU make for building the library (installation is covered Chapter 7, Installing VR Juggler). The makefiles used employ many features that are unique to GNU make thus requiring that people who wish to compile Juggler from its source are required to have it installed. The Juggler makefiles are known to to work with GNU make versions 3.78 and newer. To make sense of this documentation, please understand the concepts listed in the section called “Required Reading”. Posting about these subjects to the mailing list will probably be ignored.

In this chapter, the following conventions are used for text formatting and naming:

General Quick Start

As mentioned in the introduction, Juggler requires the use of GNU make for compiling. This section provides a very short introduction to the use of make in general. It is assumed that the GNU make command is “gmake”. To verify that the version of GNU available is one of the known working versions, do:

% gmake -v

It will return something similar to the following output:

GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
        Free Software Foundation, Inc.
...

The emphasized text is the version information. For best results, this should be one of the version numbers listed in the section called “Required Tools and Utilities for Building VR Juggler from Source”.

Most, if not all, versions of make (not just GNU make) use the following syntax for execution:

make [[VARIABLE=value...] | [target...]]

The options in square brackets are not required. The [...] strings mean that any number of the previous option can be given. If executed with no arguments, the default target will be built. This is either the first target defined in the corresponding makefile or one explicitly denoted as 'default' in the makefile. Typically, the default target is 'all'. Any target(s) can be built by simply naming them on the command line.

Variables used in the makefile can be overridden by command-line arguments. Simply name the variable (e.g., CC, the C compiler command) and give it a value (e.g., CC=/usr/local/bin/gcc). This forces all references to the variable in the makefile to use what is on the command line.

Other useful options for GNU make are the following:

  • -k: Keep going even when errors are encountered

  • -f filename: Explicitly name the makefile to use instead of the default (either Makefile or makefile found in the current directory)

  • -j [count]: Do a parallel build of the target(s), optionally limiting the number of processes spawned to count

  • -l float-value: Limit the load on the machine to the specified value when doing a parallel build