Question on make
Spencer W. Thomas
thomas at utah-gr.UUCP
Mon Jul 2 09:46:27 AEST 1984
> ...
> but I want it to read instead something like:
>
> pgm: file.a
> cc file.a -o pgm
> where x.o, y.o and z.o are in the archive file.a .
It looks like this isn't really a make question, but a cc/ld question.
If, say, x.o is first in file.a, and contains the symbol _main, then it
load properly. To make sure that a particular file is included from the
library, you can use the -u flag of ld. Pick a symbol which is defined
in x.o, and add '-u _symbol' to the beginning of your cc line:
cc -u _x_symbol -u _y_symbol -u _z_symbol file.a -o pgm
=Spencer
More information about the Comp.unix
mailing list