Sun Studio 12: Fortran Programming Guide

4.4.2.1 Replacement in a Static Library

It is not necessary to recompile an entire library if only a few elements need recompiling. The -r option of ar permits replacement of individual elements in a static library.

Example: Recompile and replace a single routine in a static library:


demo% f95 -c point.f
demo% ar -r testlib.a point.o