Only build as static library.
Add link attributes to code.

This way, the library can be built without having to specify the
libraries to link into it as a command-line argument.