This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: How to create static library with sources from multiple dirs?
- From: Alexandre Duret-Lutz <duret_g at lrde dot epita dot fr>
- To: automake at gnu dot org
- Date: Thu, 20 Feb 2003 20:15:20 +0100
- Subject: Re: How to create static library with sources from multiple dirs?
- References: <20030216004634.GA16684@white>
>>> "Bob" == Bob Rossi <bob_rossi at cox dot net> writes:
[...]
Bob> I would like to create 1 library even though the sources are spread out
Bob> over 3 directories. I can only seem to come up with 2 undesirable solutions.
Bob> 1. Put all the code in one directory and make 1 library.
Bob> 2. Create 3 library's
You haven't said which Automake version you were using. With
recent versions (>= 1.5 I think), you can build programs or
libraries from sources in subdirectories.
AUTOMAKE_OPTIONS = subdir-objects # Optional, see the manual.
noinst_LIBRARIES = liball.a
liball_a_SOURCES = sub1/foo.c sub1/foo.h sub2/bar.c sub2/bar.h ...
(It's good style to list headers files in _SOURCES instead of
EXTRA_DIST, even if they aren't compiled.)
--
Alexandre Duret-Lutz