Go to the first, previous, next, last section, table of contents.

Source and Build Directories

Builds are most often done in the same directory where the source lies. However, if you don't have enough disk space there, or if you wish to compile the Developer's Kit for more than one configuration, you may find it easiest to configure and build in a different directory from the source.

To build in a location different from the source directory, first create the build directory, which we'll call `objdir':

$ mkdir objdir
$ cd objdir

Then run configure from the top level of the source directory, which we'll call `srcdir'. You don't need to specify the `--srcdir=path' option to configure (see section Options to configure), but we show it here for the purposes of the example:

$ srcdir/configure --srcdir=srcdir ...

The default for srcdir is the directory in which configure resides.

configure creates a `Makefile' in the current directory, `objdir'. When you run make here, object files are created in `objdir' from the source code in `srcdir'. For example (assume source code is in `/usr/local/src', and binaries are to be installed under `/usr/local'):

$ mkdir /usr/local/obj/sun4
$ cd /usr/local/obj/sun4
$ /usr/local/src/configure --srcdir=/usr/local/src
Configuring for a sparc-sun-sunos4.1.3_U1 host.
...time passes...
Created "Makefile" in /usr/local/obj/sun4...

This is extremely useful if you need to create more than one installation of the Developer's Kit. For example, if you wish to rebuild and install the toolkit for a given host as well as a cross-development system for the same host, you can use a different build directory for each toolkit, with different options to configure for each build. In this way, the object files for each configuration exist simultaneously but independently, even if they are meant to install finally into the same repository.

See section Possible build variations, for examples of the build process using separate directories for source and object files.

Again, please contact Cygnus Support if you have any trouble.


Go to the first, previous, next, last section, table of contents.