status of extra_cflags.txt

James Peach jpeach at samba.org
Thu Nov 30 17:04:15 GMT 2006


On Nov 30, 2006, at 2:37 AM, Jelmer Vernooij wrote:

> On Wed, Nov 29, 2006 at 08:43:20PM -0800, James Peach wrote:
>> On 29/11/2006, at 5:06 AM, Jelmer Vernooij wrote:
>>> On Tue, 2006-11-28 at 10:41 -0800, James Peach wrote:
>>>> What's the status of extra_cflags.txt (cflags.map?)? I can see
>>>> that it
>>>> is generated by smb_build, but it's not obvious how to get things
>>>> into
>>>> it. Exactly wehat is the relationship between what goes into  
>>>> the .mk
>>>> files and what comes out into extra_cflags.txt?
>>> It's generated based on the CFLAGS field set for the dependencies
>>> of a particular subsystem.
>>> So, in the case of "smbclient" that needs popt headers:
>
>>> [SUBSYSTEM::POPT] has CFLAGS = -Ilib/popt/
>
>>> [BINARY::smbclient] has PRIVATE_DEPENDENCIES = POPT
>> 'k I see. What does PUBLIC_DEPENDENCIES do?
> Public dependencies are the dependencies that any user of a particular
> system will also need. Private ones are dependencies that are
> internal.
>
> For example, ldb uses tdb internally but anybody using tdb
> doesn't need to include any tdb headers, so tdb is a private
> dependency.
>
> ldb also uses talloc and talloc is required by users of ldb, so ldb is
> a public dependency.

So if libfoo is a DSO, then then only the private dependencies will be  
linked into libfoo. If libfoo has public dependencies then any binary  
that declares a dependency on libfoo will be linked with libfoo and  
all the libfoo public dependencies.

Is that right?

> That's the intended situation, the settings for most subsystems isn't
> correct yet. A lot more subsystems have public dependencies where they
> can be private, for example.
>
>>>> For example, when I add a source file that includes  
>>>> popt_common.h, I
>>>> need extra_cflags.txt for that file to have an additional -I./lib/
>>>> popt ... how do I make this happen?
>>> Add POPT to the list of dependencies for the subsystem that needs
>>> popt.
>> So the last argument to SMB_SUBSYSTEM is the list of extra header
>> paths that client of this subsystem will get? Is there a way to
>> specify an extra include path for external libraries?
> What do you mean exactly? External libraries found by configure should
> be defined using SMB_EXT_LIB(), or do you mean something else?

and SMB_EXT_LIB adds a CPPFLAGS line to the config.mk entry it  
generates and this will trigger a corresponding entry in  
extra_cflags.txt. Is that right?

--
James Peach | jpeach at samba.org



More information about the samba-technical mailing list