automake
[Top][All Lists]
Advanced

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

Re: libraries - dependencies


From: Santosh
Subject: Re: libraries - dependencies
Date: Wed, 11 Jun 2003 18:09:22 +0530 (IST)

hello,
        Thank you for your reply. I have a couple
of queries:

Query 1:
I have directories with a few files in each, example

src/gui/userui
src/gui/bookmarkui
src/gui/groupui
src/gui/loginui
src/gui/generalui (general gui functions)

src/func/user
src/func/group
src/func/bookmark

Is it a good idea to make each a library (I am using 
convenience libraries). Is there a better way to compile
and link together these directories or a better way to 
restructure the directories itself.

Query 2:
I have a GUI module, I make it a library.
I have a communication module which responds to
requests from GUI module and does communication.
This again is made a library. 
Now you have
        GUI -> communication
The comm. library may
receive requests from other users and it will
communicate these requests to the gui module.
Now you have
        communication -> GUI

I have combined them temporarily, but clearly
it is not the solution. 

I have looked throught automake manual and also
through the source code a couple of free s/ws.
Hope you can find time to help me.

About the libraries in automake, I have put the libraries
required by each library both under _LDFLAGS and
_DEPENDENCIES and have skipped _LDADD. This is
because _LDADD seems to add the library physically,
this is good for external libraries, but I get
into trouble with my modules, since they may be
required by other modules (libraries).

Thank you,
with regards,
Santosh.

On Wed, 11 Jun 2003, Mr E_T wrote:

> On Mon, 9 Jun 2003, Santosh wrote:
> 
> > hello,
> >     In Automake, how do we specify dependency
> > between libraries, is LIBADD for this purpose.
> >
> > How do we specify interdependencies between libraries,
> >
> > I have three libraries, A, B, C
> > A -> B (A dependes on B)
> > B -> C (B depends on C)
> > C -> A (C depends on A)
> >
> > Would be thankful for any suggestions/ideas/solutions.
> 
> This does not sound like good programming practice.
> Usaully a dependancy is built first then linked to the next at link time.
> The pattern is in the form of a tree - not a circle.
> 
> ie  A -> B
>     B -> C
>     D -> B & C
> 
> In this case A is built first then B C and finaly D because each subsequent
> library is linked to the previous.
> 
> If this is a good representation of your libraries - then consider rewriting
> them to fit into a tree type figure.
> 
> If the library/object is found by configure - then use prog_LIBADD else if it
> is
> created by you use prog_LDADD.
> 
> 





reply via email to

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