[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automake and CUDA

From: Ralf Wildenhues
Subject: Re: Automake and CUDA
Date: Mon, 10 Aug 2009 20:52:44 +0200
User-agent: Mutt/1.5.20 (2009-06-15)

Hello Chris,

* crjjrc wrote on Fri, Aug 07, 2009 at 08:12:51PM CEST:
> LDADD = ../cj_graphics/libcjgraphics.a
> AM_CPPFLAGS = -DCJDATADIR=\"$(pkgdatadir)\" \
>               -DCJCONFIGSDIR=\"@abs_top_srcdir@/configs\" \
>               -I@top_srcdir@/cj_graphics
> .cu.o:
>    nvcc -c -o $@ $<

BTW, I'd always write this as

NVCC = nvcc
        $(NVCC) -c -o $@ $<

so that your user can override nvcc with her nvcc-3.x or $host-nvcc if
need be (or you can go all the way and add an AC_CHECK_TOOLS([nvcc])

> bin_PROGRAMS = first
> first_SOURCES =

> nvcc -c -o first.o ../../trunk/cuda/
> first.o ../cj_graphics/libcjgraphics.a -lhistory -lglut -lxml2 -lftgl -
> lMagick++ -lGL -lGLU -lMagick++ -lftgl -lxml2 -pthread -Wl,-Bsymbolic-
> functions  -lwx_gtk2u_core-2.8 -lwx_gtk2u_adv-2.8 -lwx_baseu-2.8 -
> lwx_gtk2u_gl-2.8
> /bin/bash: first.o: command not found

automake doesn't know which linker to use with .cu files.  So, if you
happen to not use any other language in this 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

(see 'info Automake "how the linker is chosen"').

BTW, the automake@ list is a bit more appropriate for such questions
(you are likely to get an answer about Automake more quickly).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]