Question about compiling using nvcc.

I have a very long Makefile to compile using g++. If I want to add some CUDA functions. Is there an easy way to add nvcc to compile it?

What I have tried is to simple add nvcc and -ccbin the g++. The command looks like below:

/usr/local/cuda-10.1/bin/nvcc -ccbin -gencode arch=compute_70,code=compute_70 -rdc=true /common/pkgs/gcc/v6.3.0/bin/g++ /home/m/output/cdn_hier/lnx86/tools.lnx86/m/obj/64bit/liba/src/PC.o /home/m/output/cdn_hier/lnx86/tools.lnx86/m/obj/64bit/liba/src/MP.o /home/m/output/cdn_hier/lnx86/tools.lnx86/m/obj/64bit/liba/src/a.o -O3 -m64 -dy -std=c++11 -L/home/m/output/cdn_hier/lnx86/tools.lnx86/m/lib/64bit -lcusolver -lcublas -lcusparse -o /home/m/output/cdn_hier/lnx86/tools.lnx86/m/lib/64bit/liba.a -Wl,-Bdynamic -lpthread -Wl,-Bstatic -Wl,-Bdynamic -lc -lm -ldl -lrt -Wl,-Bdynamic && home/m/defs/ -exe liba.a -cdn lnx86 -arch linuxopt -bits 64 -opt opt -mixed no -output home/m/output -binpath home/m/output/cdn_hier/lnx86/tools.lnx86/m/bin/64bit/liba.a -tgt -fake;

and the error is
nvcc fatal : Unknown option ‘dy’

Is there a simple way to solve this problem and compile using nvcc?

How about removing the option that is unknown to the compiler and clearly pointed out in the error message?