added common_gpu makefile helper

This commit is contained in:
Evghenii
2014-01-05 10:00:44 +01:00
parent 034e6b9a0b
commit fd429e4fda
14 changed files with 114 additions and 1578 deletions

View File

@@ -5,7 +5,7 @@ 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
nvcc -dc $(FILE).cu -arch=sm_35 -Xptxas=-v -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