[Autotools] Subdirectories in the source tree

Andi Drebes <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization Read Free News
Message-ID <[email protected]>
Hi everybody!
I'm currently developing an application that I want to distribute now. I
want to package everything using the autotools, so that everybody only has
to download the tarball, run configure, make and make install.
I already got things working with some test source files located in the same
directory.
But the application that I developed has a bunch of subdirectories that all
belong to the same target. My directory structure looks like this:

+ main.cpp
+ src
  |-- exception (directory with source files)
  |-- handler   (directory with source files)
  |-- number    (directory with source files)
  |-- parser    (directory with source files)
  |-- (some .h and .cpp files)
+ tests
  |-- handler   (directory with source files)
  |-- nodes     (directory with source files)
  |-- number    (directory with source files)
  |-- (some .h and .cpp files)

All the files have to be compiled. Then, all the object files should be
linked together to create an executable. That's it. A simple project, whose
files are located in subdirectories.

For me, it seems as if the autotools don't support subdirectories (only if
every subdirectory represents another target). Is there a way to do the
stuff described above in an elegant way? I would be glad if somebody could
explain me how to do it, or send me a link with a similar project that has
the same directory structure.

I'm currently using:
Debian Sarge, Kernel 2.6.17.11, autoconf 2.59, automake 1.4-p6, libtool
1.5.6, aclocal 1.4-p6 and bash 3.1.14(1).

        Thanks in advance,
                Andi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.