Files
ispc/examples_cuda/mandelbrot_tasks3d/_cuobj/Makefile
2014-01-05 10:00:44 +01:00

16 lines
409 B
Makefile

FILE=mandel
LIB=lib$(FILE)_cudart.a
all: $(LIB)
$(LIB) : $(FILE).cu
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
clean:
/bin/rm -f *.o *.a run.sh