[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to create static library with sources from multiple dirs?
From: |
Alexandre Duret-Lutz |
Subject: |
Re: How to create static library with sources from multiple dirs? |
Date: |
Thu, 20 Feb 2003 20:15:20 +0100 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) |
>>> "Bob" == Bob Rossi <address@hidden> 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