6.2. Frequently Asked Questions

Experience has shown that there are several common questions that arise as people begin to use Automake for their own projects. It seems prudent to mention these issues here.

Users often want to make a library (or program, but for some reason it comes up more frequently with libraries) whose sources live in subdirectories:

lib_LIBRARIES = libsub.a
libsub_a_SOURCES = subdir1/something.c ...

If you try this with Automake 1.4, you'll get an error:

$ automake
automake: Makefile.am: not supported: source file 'subdir1/something.c' is in subdirectory

For libraries, this problem is mostly simply solved by using libtool convenience libraries. For programs, there is no simple solution. Many people elect to restructure ...

Get GNU Autoconf, Automake, and Libtool now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.