[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    RE: How to avoid installation of libraries?
From:       David Faure <David.Faure () cramersystems ! com>
Date:       2000-01-25 11:37:50
[Download RAW message or body]

> Hi,
> 
> I wonder how to avoid installation of libraries that I
> only build for convenience reasons.
> For example, I have several sub directories each building
> a different binary but all of them having some code in 
> common. The common code is fairly small and in most cases
> only one of the executables is running.
> So I decided to put the common code into an archive
> that each executable is linked with statically.
> The problem arising now is, that this archive (let's call
> it x.la for now) is installed in $KDEDIR/lib which is,
> of course, not my intention.
> 
> My Makefile.am for the library looks like this:
> 
> INCLUDES         = -I$(QTDIR)
> 
> lib_LTLIBRARIES  = x.la
> 
> x_la_SOURCES     = <lots of .cpp's>
>   
> noinst_HEADERS   = <lots of .h's>
> 
> x_la_LDFLAGS     = -version-info 1:0:0 $(X_LDFLAGS) $(QT_LDFLAGS)
> $(USER_LDFLAGS)
> x_la_LIBADD      =
> 
> Is there any way to avoid installation?

Easy: replace lib_LTLIBRARIES with noinst_LTLIBRARIES,

and keep "linking" to the .la file, using $(top_builddir)/dir/ to
point to it.
See for instance kdebase/kcontrol/display which produces libbgnd.la,
used by kcmdisplay but also by kdesktop.


--
David Faure
faure@kde.org - KDE developer
david@mandrakesoft.com - Mandrake
david.faure@cramersystems.com - Cramer Systems

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic