Help making object file archives
D'Arcy J.M. Cain
darcy at druid.uucp
Thu Jun 13 07:44:26 AEST 1991
In article <1991Jun12.121206.26970 at 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 at druid) |
D'Arcy Cain Consulting | There's no government
Toronto, Ontario, Canada | like no government!
+1 416 424 2871 |
More information about the Comp.unix.questions
mailing list