Galaxy Communicator Documentation:

Guide to the Makefiles

License / Documentation home / Help and feedback

Introduction

The Make organization is designed to support multiple versions of object files in parallel. It does this by separating .o files, libraries, and executables into separate directories based upon the machine architecture (processor) and operating system. It also separates the .o files into separate directories according to compile type (e.g. optimized, debug, profile, etc.), and separates libraries and executables by appending an appropriate identifier. For example, a library libfoo.a would have a debug form of libfoo_debug.a, and the debug version of the executable a.out would be a.out_debug. The Makefiles are designed to link automatically against the correct versions of object files and libraries.

In addition to being separated by directories according to machine architecture and OS (ARCH-OS), each executable has a symbolic link in the top level bin directory which points to the file fat_binary. fat_binary is a csh script which figures out the ARCH-OS of the machine its running on, looks at the name by which it was invoked, and executes the appropriate ARCH-OS-specific executable.

We currently support compiling optimized, debug, and profiled versions of everything, and may support purify'd versions in the future. As for ARCH-OS, MIT typically builds on Sparc and x86 Solaris, and MITRE typically builds on Sparc Solaris and Linux; these systems can be considered "supported."  See the section on supported architectures.

The next section will describe how to build the system "out of the box."  You should read the section on installing first.

Structure and Organization

(Note: the following discussion is augmented by the section on directory organization. The Makefile structure of the core library is inherited directly from MIT.)

All source code resides under src/, and is typically separated so that each directory corresponds to either one library, one server, or one or more executables. There is a top level Makefile in src/, which provides a simple way to 'make' various targets in one or more directories. (e.g. libs, hub, etc.). This Makefile basically invokes the appropriate targets in the subdirectory Makefile(s).

Each subdirectory Makefile is essentially a slightly modified version of templates/Makefile.stub with the appropriate variables defined. Makefile.stub is designed to be as simple as possible. This is accomplished by hiding almost all of the Makefile complexity in files in the templates/ directory. Makefile.stub 'includes' the file rules.make, which in turn includes config.make. The former file defines a variety of symbolic variables, as well as all the rules and targets. The latter provides all the details of your configuration as described in the installation documentation.

All Makefiles (except for the top-level Makefile) support the same set of global targets, which are defined in templates/rules.make  For a description of these and toplevel targets, see the installation documentation.


License / Documentation home / Help and feedback
Last updated September 23, 1999