help-make
[Top][All Lists]
Advanced

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

libraries


From: Kris Thielemans
Subject: libraries
Date: Fri, 1 Nov 2002 14:50:07 -0000

Hi,

I've been trying to play around with the default rules to build libraries,
but get stuck.

First question: is there a way to get a list of the built-in rules? I think
this would be nice for educating, and also for being able to disable
specific rules instead of the whole bunch.

On to what I'm trying to do. I'd like to make sure that 'ar' is really
called only once in the building of the library. With the default rules (and
my own stuff) 'ar' gets called for every changed .o file. This works, but
seems to be slow.

My current set-up:
- a default rule for make .o files

        $(DEST)%.o: *.cxx
           blabla

- a dependency rule for the library

OBJS = $(SOURCES:%.cxx=$(DEST)%.o)
LOBJS = $(DEST)libbuildblock.a($(OBJS))

$(DEST)libbuildblock.a: $(LOBJS)
        ranlib $@

As I said, it works fine (which is great as it's very economical!), but I'd
like to speed it up.

As an aside, having the .o files as temporary targets should normally delete
them after making. That does not happen in my current setup. Is this desired
for any reason? If not, I'd lik,e to clean them up afterwards to save some
disk space...


Thanks!

Oh yes, I think this mailing list could do with some SPAM filters (and a
searchable archive). I know, more work... (but only in the short term
though).


Kris Thielemans
(kris.thielemans <at> ic.ac.uk)
Imaging Research Solutions Ltd
Cyclotron Building
Hammersmith Hospital
Du Cane Road
London W12 ONN, United Kingdom

web site address: http://www.irsl.org/~kris





reply via email to

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