On Mon, 2016-07-11 at 20:25 +0200, zamek42 wrote:
> I have a project which has more different source dirs but I want to
> use only one build directory. VPATH is not usable, because there are
> more files with the same name in different directories.

If you have different source files with the same name in different
source directories but you want to put all the object files into the
same build directory, how can that work?

Anyway, in general you'll have to create one pattern rule per source
directory, like this:

  build/%.o : src1/%.c
          $(COMPILE.c) -o $@ -c $<

  build/%.o : src2/%.c
          $(COMPILE.c) -o $@ -c $<

  build/%.o : src3/%.c
          $(COMPILE.c) -o $@ -c $<

However, this won't solve your "same filename" problem... you'll have to decide 
how you want it to work before you can make it work that way.

_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to