arch = 12 cuda = /usr/local/cuda opts = -arch=sm_$(arch) -DSM$(arch) --use_fast_math -O2 extr = -Xptxas=-v --compiler-options=-O2,--fast-math nvcc = $(cuda)/bin/nvcc ppc.cu $(opts) $(extr) clib = gcc -shared -fPIC -Wl,-soname all: $(nvcc) -o ppc lib: $(nvcc),-fPIC -DXLIB -c -o ppc.o && $(clib),xppc ppc.o -o libxppc.so clean: rm ppc.*.* ppc.ptx ppc.o ppc.hash || true