Reputation: 822
_OBJ = hellomake.o hellofunc.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
I am trying to learn makefile syntax. What is the second line saying? I am clueless. Can I get each operator what it is for in the above please.
Upvotes: 0
Views: 79
Reputation: 13356
It's pattern substitution
function call. Here is the link to the manual.
In your case, line2 prefixes all the filenames in _OBJ
with $(ODIR)/
and stores the results into variable OBJ
.
Upvotes: 1