* Adam Mercer wrote on Mon, Jun 29, 2009 at 10:19:59PM CEST:
> On Sat, Jun 27, 2009 at 05:33, Ralf Wildenhues wrote:
> 
> > (Note also that using $< in target rules is not portable to non-GNU
> > make).
> 
> Is there a more portable version?

Using $< in inference rules, as in my example, is portable.
In target rules, you can spell out the input file name
(including an eventual vpath prefix).

> > Here's what I would do:
> >
> > NVCC = nvcc
> > NVCFLAGS = -cuda --host-compilation=c
> > SUFFIXES = .cu .c
> > .cu.c:
> >        $(NVCC) $(NVCFLAGS) $(INCLUDES) $(CPPFLAGS) --output-file $@ $<
> >

Cheers,
Ralf


Reply via email to