Newsgroups: comp.unix.questions
Path: utzoo!telly!druid!darcy
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Subject: Re: Help making object file archives
Message-ID: <1991Jun12.214426.9895@druid.uucp>
Organization: D'Arcy Cain Consulting, West Hill, Ontario
References: <1991Jun12.121206.26970@ircam.fr>
Date: Wed, 12 Jun 91 21:44:26 GMT

In article <1991Jun12.121206.26970@ircam.fr> Peter Wyngaard writes:
>to write the (gnu)makefiles for them.  I don't like the built-in implicit
>rule for making an archive member from an object file because it does an
>'ar' for each object file.  This is VERY slow.
[stuff deleted]

Quite simple actually.  Try this:

-------------------------------------------------------
UNIX_L=/usr/lib/libmine.a
ALL_OBJECTS =	parse nx_wk_dy strmem mktime [etc ...]

$(UNIX_L):	$(foreach o, $(ALL_OBJECTS), $o.o)
	ar r $(UNIX_L) $?
--------------------------------------------------------

The only problem is that you are left with .o files.  This is what
the standard method avoids.

-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   There's no government
Toronto, Ontario, Canada           |   like no government!
+1 416 424 2871                    |
