Reputation: 1309
I am trying to build a makefile in linux. The code which goes into the makefile is as follows:
NVCC = /usr/local/cuda/bin/nvcc
CUDAPATH = /usr/local/cuda
NVCCFLAGS = -I$(CUDAPATH)/include
LFLAGS = -L$(CUDAPATH)/lib64 -lcuda -lcudart -lm
VectorAdd:
$(NVCC) $(NVCCFLAGS) $(LFLAGS) -o VectorAdd VectorAdd.cu
So when I type "make"
I get the following error:
How do i get rid of it and build my make file?
Upvotes: 0
Views: 321
Reputation: 151799
Since you're using NVCC you don't really need those LFLAGS and NVCCFLAGS definitions. nvcc knows how to find all that automatically.
But if you want to fix it, get rid of the space at the end of your cuda path definition:
CUDAPATH = /usr/local/cuda
^ there is a space here, delete it
Upvotes: 4