O'Reilly logo

Autotools by John Calcote

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reducing Complexity with Convenience Libraries

Jupiter is fairly trivial as open source software projects go, so in order to highlight some more of Automake's key features, let's expand it a little. We'll first add a convenience library, and then modify jupiter to consume this library. A convenience library is a static library that's only used within the containing project. Such temporary libraries are generally used when multiple binaries in a project need to incorporate the same source code. I'll move the code in main.c to a library source file and call the function in the library from jupiter's main routine. Begin by executing the following commands from the top-level project directory:

$ mkdir common
$ touch common/jupcommon.h
$ copy src/main.c ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required