[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compilation flags per object file

From: Bruno Haible
Subject: Re: compilation flags per object file
Date: Fri, 25 Aug 2006 18:56:14 +0200
User-agent: KMail/1.9.1

Ralf Wildenhues wrote:
> > I wouldn't mind if the specification were per source file:
> > 
> >   localcharset_c_CPPFLAGS = $(AM_CPPFLAGS) -DLIBDIR=\"$(libdir)\"
> That's a possibility, but it runs contrary of the notion of per-target
> flags.  More than one object may be created from one source file.

You mean,
are contradictory? I can live very well with one of them being incremental:

      sourcefile_c_ADDED_CPPFLAGS = -DLIBDIR=\"$(libdir)\"

so that the entire CPPFLAGS will be the combination:

      $(target_CPPFLAGS) $(sourcefile_c_ADDED_CPPFLAGS)

Or you mean, if someone uses the same source file with different targets
_and_ wants to specify different CPPFLAGS for both compilations:

      target1_SOURCES = ... sourcefile.c ...
      target2_SOURCES = ... sourcefile.c ...

This is a rare case; I think in this case the workaround of

      target1_SOURCES = ... sourcefile1.c ...
      target2_SOURCES = ... sourcefile2.c ...
      EXTRA_DIST = sourcefile.c
      sourcefile1.c ::= #include "sourcefile.c"
      sourcefile2.c ::= #include "sourcefile.c"

is acceptable.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]