I've got over 100 libraries to link in a final build, and the command lines
are extremely long. I'd like to use the "-lthing" syntax with a "-L" flag
to shorten things. What I've got now is something like:
mytarget: $(OBJS) $(LIBRARIES)
...
# in a "rules.mk" file
$(outdir)/%.elf:
$(LINK.o) $^ $(LDLIBS) -o $@
But the $^ expands into full paths. If I put the libraries into LDLIBS and
not as a dependency, then make doesn't know to relink if a library is
modified. Other solutions I've seen look like:
$(LINK.o) $(OBJS) $(LDLIBS) ...
But that doesn't work to well in a pattern rule. What do others do for this
sort of thing? Is it not worth bothering to keep the command lines small
(I already have quiet vs. verbose flag)?
Darin Johnson
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make