help-make
[Top][All Lists]
Advanced

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

Re: Maximizing Library Build Parallelism


From: Philip Guenther
Subject: Re: Maximizing Library Build Parallelism
Date: Tue, 13 Jan 2009 10:12:44 -0800

On Tue, Jan 13, 2009 at 7:34 AM, EXT-Pennington, Dale K
<address@hidden> wrote:
>> From: Christophe LYON [mailto:address@hidden
>>
>> why wouldn't you use a single library rule, such as:
>> mylib.a: $(OBJS)
>>       ar cr $@ $^
>
> Main reason not to would be the total rebuilding of the library every
> time, even if only 1 object file had changed. Right now, I use a rule of
>
> (%.o) : $(OBJ_DIR)/%.o
>        @ar $(ARFLAGS) $@ $<
>
> Where ARFLAGS starts as -csr.

Hmm, does it work with $?

mylib.a: $(OBJS)
        $(AR) $(ARFLAGS) $@ $?

I believe that should only run 'ar' once, with the list of members
that are newer than the archive, but I haven't actually used that
myself...


Philip Guenther




reply via email to

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