Try:
g++ -c functions.cpp -std=c++0x
g++ -c setup.cpp -std=c++0x
nvcc timestep.cu copy.cu continuity.cu discharge.cu flood.cu -arch=sm_35 -lcudadevrt -rdc=true -c
nvcc timestep.o copy.o continuity.o discharge.o flood.o -arch=sm_35 -lcudadevrt -dlink -o dlink.o
g++ functions.o steup.o dlink.o -o a.out -std=c++0x -L/<path>/cuda/lib<64,32> -lcudart -lcudadevrt