first support for integration with NVCC/CUDART API

This commit is contained in:
Evghenii
2013-11-22 13:06:51 +01:00
parent 280f3515b5
commit 406aad78fe
5 changed files with 61 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
FILE=mandel
LIB=lib$(FILE)_cudart.a
all: $(LIB)
$(LIB) : $(FILE).cu
nvcc -dc $(FILE).cu -arch=sm_35 -dryrun 2>&1 | sed 's/\#\$$//g'|awk '{ if ($$1 == "cicc") print "cp ../__kernels.ptx " $$NF; else print $0 }' > run.sh
sh run.sh
nvcc -dlink -o $(FILE)_dlink.o $(FILE).o -lcudadevrt -arch=sm_35
nvcc $(FILE).o $(FILE)_dlink.o --lib -o lib$(FILE)_cudart.a
clean:
/bin/rm -f *.o *.a run.sh