Never mind. I can do this with scanner. I register scanner for this command, and thus it knows the implicit .o dependencies from command line. In the command, I will link $^ if $^ is non-empty, otherwise I will link all .o.
Hi, I'd like to write a makepp rule which links .o files into .a file. If user specifies the dependencies of .a like this: libx.a: a.o b.o c.o libx.a: d.o then we will link a/b/c/d.o into libx.a. If user does not specify dependencies of libx.a, then I'd like to link all .o files that can be built into libx.a. Can anyone help this? Thanks, Justin