Re: Archiving last step

Cassé Hugues <[email protected]> Fri, 02 Sep 2005 14:32:59 +0200
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
  I think you may use something like:


all: ${LIBPREF}mainlib{$LIBSUF} mainprogram

LIBS = -L. -lmainlib

:program mainprogram : mainprogram.c

:lib mainlib : object1.c object.c object.c


  But I don't think it will resolve your problem because static 
libraries and linker don't allow splitting an object unit. There is a 
lot of causes to this: static variables or functions symbols may be 
hidden, function bodies are not clearly defined in the object unit and 
so on.
  The lonely solution to this problem I know is to split sources.


Bram Neijt wrote:

>Hi.
>
>I use sepereate files for my functions, and in the last linking phase,
>a-a-p will run g++ -o mainprogram mainprogram.o object1.o object2.o
>object3.o
>
>However, the function defined in object2 might not be used by
>mainprogram.o. This will create a larger binary then necesarry.
>
>The solution to this problem is an intermediat archive "ar ru
>mainprogram.a object1.o object2.o object3.o" (not totally sure about
>the ar command) and then do the final link phase with "g++ -o
>mainprogram mainprogram.o mainprogram.a" the executable will be
>smaller then using the seperate objects.
>
>How can I add this to my aap program-rule?
>
>Greetings,
>  Bram
>
>
>-------------------------------------------------------
>SF.Net email is Sponsored by the Better Software Conference & EXPO
>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
>_______________________________________________
>A-A-P-user mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/a-a-p-user
>
>
>
>  
>
casse.vcf (text/x-vcard, 265 B)
begin:vcard
fn;quoted-printable:Hugues Cass=C3=A9
n;quoted-printable:Cass=C3=A9;Hugues
org:IRIT-UPS;TRACES
adr:;;118 route de Narbonne;Toulouse;;31062;France
email;internet:[email protected]
title:MCF
tel;work:05 61 55 63 60
version:2.1
end:vcard