automake
[Top][All Lists]
Advanced

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

RE: libs in subdirs


From: Bernard Dautrevaux
Subject: RE: libs in subdirs
Date: Thu, 23 Nov 2000 15:00:26 +0100

> -----Original Message-----
> From: Bryan VanDeVen [mailto:address@hidden
> Sent: Tuesday, November 21, 2000 6:26 PM
> To: address@hidden
> Subject: libs in subdirs
> 
> 
> I think this has been coverered for shlibs but I culd not 
> find anything for 
> static libs...   is there ary way (without libtool at the 
> present) to build 
> static convenience libs and then have them all combined in a 
> top level 
> directory?
> 
> For instance
> 
> ..../somelib
> ..../somelib/dbdbv
> ..../somelib/gdemv
> 
> so there are source files in all three directories, and we 
> would like to 
> eventually combine all the object files into "libsomelib.a"
> 
> we tried just listing all the sources in the top level 
> makefile.am, but 
> automake does not like having any sources in subdirectories 
> it seems.  So, if 
> we just build libdbdbv.a and libgdemv.a in their respective 
> directories with 
> their own makefile.am's, is there a way to merge them 
> together with the top 
> level objects into one "libsomelib.a" ?
> 

What about a rule like:

libsomelib.a: dbdv/libdbdbv.a gdem/libgdemv.a 
        rm -rf libsomelib.temp
        mkdir -p libsomelib.temp
        cd libsomelib.temp && $(AR) x ../dbdv/libdbdbv.a 
        cd libsomelib.temp && $(AR) x ../gdem/libgdemv.a 
        cd libsomelib.temp && $(AR) $(ARFLAGS) ../libsomelib.a *.o
        $(RANLIB) libsomelib.a 
        rm -rf libsomelib.temp

I know this is not so elegant, but it should work :-)

HTH

        Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:    +33 (0) 1 47 68 80 80
Fax:    +33 (0) 1 47 88 97 85
e-mail: address@hidden
                address@hidden
-------------------------------------------- 



reply via email to

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