In general, you either have to specify $(OBJDIR)
on the left hand side of all the rules that place files in $(OBJDIR)
, or you can run make from $(OBJDIR)
.
VPATH
is for sources, not for objects.
Take a look at these two links for more explanation, and a "clever" workaround.