diff --git a/Makefile b/Makefile index a2ad125..854c4e2 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,11 @@ gpu-stream-ocl: ocl-stream.cpp c++ $< $(FLAGS) -o $@ $(LIBS) gpu-stream-cuda: cuda-stream.cu +ifeq ($(shell which nvcc > /dev/null; echo $$?), 0) nvcc $< $(FLAGS) -o $@ +else + @echo "Cannot find nvcc, please install CUDA"; +endif clean: rm -f gpu-stream-ocl gpu-stream-cuda