Incremental Compilation

gcc and most other implementations offers incremental compilation.

Useful if you need to recompile only part of a very large program.

For example:

% gcc  -c  a.c
% gcc  -c  b.c
% gcc  -c  c.c
% gcc  -o  prog  a.o  b.o  c.o

The .o files are called relocatable object files.

The last command links the object files together to produce a binary.

Note .o files are platform specific.

Incremental compilation also used to produce libraries.

Index