Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

Make targets

This document describes the 'make' targets defined in OpenMS/source/Makefile.

Frequently used

Only a few make targets are needed for your every day work. A typical compile-link-test cycle will look like this:

make lib install test TOPP TOPPtest
	

The main make targets are:

default
The default target is made if you type make without further arguments.
See the next target, 'lib'.

lib
Create the shared OpenMS libraries.
This requires the following subtasks to be done:

To summarize, make lib will compile and link the library, but not install it. The subtasks are explained below.

install
Install the shared libraries. The shared libraries are moved to the lib directory (typically OpenMS/lib/<architecture>/).

Note: that the lib directory must be included in the in LD_LIBRARY_PATH environment variable so that applications will find it at startup.

test
Runs an extensive test suite for the OpenMS library (see source/TEST/).

Note: tests are restricted to a total CPU time of 60 seconds per test. You can change this default by setting the OPENMS_TESTTIMEOUT environment variable to another value (in seconds). If the timeout condition is met, the test will fail.

TOPP
Creates the TOPP tools in OpenMS/bin/.

TOPPtest
Runs an extensive test suite for the TOPP tools (see source/TEST/TOPP/).

Less frequently used

Normally you will not need to invoke these targets directly ... at least not very often. Nevertheless they are necessary in certain situations and perhaps important for understanding how the build system works.

depend
Make will (re)compile a *.o file only if at least one of its source files (*.h, *.C, etc.) has changed. The dependency information is stored in .Dependencies files, one per directory. The .Dependencies files are included by the Makefile so that its update check will work. The .Dependencies lines are created by the compiler using a special option.

Note: For performance reasons, make will not check whether the .Dependencies files themselves are up-to-date.

For example, when you have added or removed source files, then make might fail to realize that an *.o file needs to be recompiled, or it might complain that it doesn't know how to generate some *.h file which is in fact unnecessary.

Call make depend if you think the .Dependencies files are outdated. (Note for the impatient: It suffices to call make depend in those directories where the changes have taken place.)

make checks whether the file source/.Dependencies exists, and if not, all .Dependencies files are created automatically. Thus make depend is implied when you compile OpenMS for the first time.

(Note for experienced users: On the other hand, source/.Dependencies is deleted by configure to trigger a make depend. If you have invoked configure but you are really sure the dependencies are still fine, you can touch source/.Dependencies to avoid this.)

dirs
Runs over the source directories listed in and calls make recursively. The target is default, which means that the *.C files are compiled to *.o files.

collect, recollect
This will collect the names of the object files that go into the library. The list is stored in the file libOpenMS.objects, which is handed on to the linker.

Note: For reasons similar to those explained for make depend, the lib*.objects files might become outdated when you have changed the Makefiles in subdirectories, most notably the CPP_SOURCES variable and its relatives which are defined there.

Such an error might show up when linking the library (because an *.o file listed in the *.objects file is not found) or, worse, when linking an application against the OpenMS library (because you get undefined or doubly defined symbol names).

In such a case, the remedy is to call make recollect and then make lib again.

staticlibs, sharedlibs
Normally make lib will create shared libraries. However, there are situations in which you might prefer to use a static library instead, for example to simplify the debugging process. Then you can use make staticlibs to create the static versions of the libraries.

Note: however, that when you link an application against the OpenMS libraries, the linker will generally prefer the shared libraries over the static libraries. Therefore it is necessary to remove the shared libraries to make the static libraries effective. This can be done by make delete.shared.

install.static, install.shared
Installs the static / shared libraries.

libclean
Removes all OpenMS libraries installed to the current prefix.

clean
Clean up. This removes *.o, *.objects, core.*, *~, and .Dependencies. Removes the installed libraries. Purges the subdirectories recursively using make default_clean, etc., etc., etc.. See common.mak for details.

Files

We add a few links to the most important files controlling the build process:

source/Makefile
Top-level Makefile.
Generated from Makefile.in by configure.

common.mak
Provides targets used by subordinated Makefiles. s
Generated from common.mak.in by configure.

config_defs.mak
Provides definitions and macros to be used by subordinated Makefiles. Most of this reflects the options given to the configure script and the results of its test.
Generated from config_defs.mak.in by configure.

OpenMS/config.h
C++ header file containing macro definitions generated by configure. Most of this reflects the options given to the configure script and the results of its test.
Generated from config.h.in by configure.

Generated Tue Apr 1 15:36:40 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1