Re: Automake and CUDA

crjjrc <[email protected]> Tue, 11 Aug 2009 12:48:00 -0700 (PDT)
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <a440f318-120f-4f5e-af7e-b24b531e63d3@w41g2000yqb.googlegroups.com>
On Aug 10, 1:52 pm, Ralf Wildenhues <[email protected]> wrote:

> automake doesn't know which linker to use with .cu files.  So, if you
> happen to not use any other language in this Makefile.am file, then
> $(LINK) will probably not be defined at all.  You could either define
> it to something sensible (containing $(NVCC) if that is appropriate)
> or, if you just want to use the C linker, add a line
>   EXTRA_first_SOURCES = dummy.c

Excellent.  Thank you for your thorough help.  I was able to get this
working.  nvcc seems to wrap around gcc, so I needed to extend the
custom rule to be almost identical to the rules for C code:

  $(NVCC) -c $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $
(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -o $@ $<

- Chris