Makefile with *.cu and *.cpp

Hello,
I am new in this forum, and i am having problem doing a make file to use *.cu and *.cpp files.

CUDA_INSTALL_PATH ?=/usr/local/cuda
CUDA_SDK_PATH ?= /home/grasp/NVIDIA_GPU_Computing_SDK

CC=g++
NVCC := /usr/local/cuda/bin/nvcc
DEPS= /home/grasp/IVT/src/Image/ByteImage.h
OBJS = LoadingImage.o LoadingImage_kernels.o

INCD = -I$(CUDA_SDK_PATH)/C/common/inc -I$(CUDA_INSTALL_PATH)/include -I./ -I/home/grasp/IVT/src

Common flags

COMMONFLAGS += $(INCD)
NVCCFLAGS += $(COMMONFLAGS)
CXXFLAGS += $(COMMONFLAGS)
CFLAGS += $(COMMONFLAGS)

LIB_CUDA := -L$(CUDA_INSTALL_PATH)/lib -lcudart

LoadingImage : $(OBJS)
$(CC) LoadingImage.o -L/home/grasp/IVT/lib/linux -o LoadingImage -livt

LoadingImage_kernels.o : LoadingImage_kernels.cu
$(NVCC) -c $< -o $@ $(NVCCFLAGS) -I$(DEPS)
LoadingImage.o : LoadingImage.cpp
$(CC) -c $< -o $@ $(CXXFLAGS)

I don’t know why it doesn’t work. I receive an answer like:
LoadingImage_kernels.cu:47: error: ‘blockIdx’ was not declared in this scope
LoadingImage_kernels.cu:47: error: ‘BlockWidth’ was not declared in this scope
LoadingImage_kernels.cu:48: error: ‘blockIxd’ was not declared in this scope
LoadingImage_kernels.cu:48: error: ‘blockDim’ was not declared in this scope
LoadingImage_kernels.cu:48: error: ‘threadIdx’ was not declared in this scope

Someones has any idea? My program is not correct yet, but this kind of errors means that something wrong is happening.

The other way to solve this problem is that i can use Eclipse, but i tried to compile with Eclipse and i coudn’t make it works.
Do you know any tutorial to run CUDA compiler in Eclipse?

Thank you.