CUDA & Matlab mex files mex compiler with cuda

Hi,
i have written something like a little toolbox with rotation, fft, etc. and now i want them to be useable thru matlab so i thought of mex. now the problem is if i make mex and some cpp file (in this file i use the methods from cu files) mex tries to compile them. how can i tell mex which files mex should compile and which files nvcc should compile.
mfg

Download the files from:
[url=“Game Development Tools, SDKs, and Partner Engines | NVIDIA Developer”]http://developer.nvidia.com/object/matlab_cuda.html[/url]

There are a whitepaper and scripts for both Windows and Linux that show how to build mex files.