Hi,

Lets say I have a make like this:

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@

then this works:

make file.o
make test/file.o

Now I would like to do the following:

%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@

And I would still like to write 'make file.o' and 'make test/file.o'. But the latter wont work as long as there's a '/' in the implicit rule. If I try it I get a "make: *** No rule to make target `test/file.o'. Stop.". (This seems correct according to the docs, but I still need to circumvent this!)

Anyone got any ideas to make this work?


Thanks,
Svein



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to