help-gnu-utils
[Top][All Lists]
Advanced

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

Automake and CUDA


From: crjjrc
Subject: Automake and CUDA
Date: Fri, 7 Aug 2009 11:12:51 -0700 (PDT)
User-agent: G2/1.0

Hi.  I've got an existing project that is managed with autotools.  I'm
trying to integrate code written in CUDA, but I'm not able to get past
generating the object files.  CUDA code files have a *.cu extension
and are compiled with NVIDIA's nvcc compiler, so I added a suffix rule
to my Makefile.am:

------------------------
LDADD = ../cj_graphics/libcjgraphics.a
AM_CPPFLAGS = -DCJDATADIR=\"$(pkgdatadir)\" \
              -DCJCONFIGSDIR=\"@abs_top_srcdir@/configs\" \
              -I@top_srcdir@/cj_graphics

.cu.o:
   nvcc -c -o $@ $<

bin_PROGRAMS = first

first_SOURCES = first.cu
------------------------

When I type "make first" in the build directory, the object file
first.o is built but the executable is not.  I get:

------------------------
nvcc -c -o first.o ../../trunk/cuda/first.cu
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
make: *** [first] Error 127
------------------------

My understanding of automake is weak, but the documentation made it
sound like the suffix rule should be sufficient.  Any idea why first.o
is being run as an executable instead of being linked?  Your help is
appreciated!

- Chris


reply via email to

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