Hello,

Svein E. Seldal wrote:

> 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.".

Will the VPATH variable work for you, as in the
following?

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

--smig


______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca


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

Reply via email to