On 3/9/11, Dmitry N. Mikushin <[email protected]> wrote:
> Ok, but could you recommend an approach for packing multiple libraries with
> a single rule, that supports varying sources list and flags? Or is this
> method not of your taste in general?
In the systems that I've hacked on, the rule has been "directories and
libraries are cheap: separate sources (and objects) into a directory
per library or program". Cross-directory references are best done via
-I and -L and never via ../whatever references.
With that, CFLAGS assignments and similar can be done on a per
directory basis, whether via a Makefile per directory (where a
recursive make setup is used for whatever reason) or via a
${OBJDIR}/%.o: ${SRCDIR}/%.c rule for each OBJDIR:SRCDIR pair.
Philip Guenther
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make