From 642564a97ef62c0f7cb78a9a86d17ba81c3e511e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismael=20Barros=C2=B2?= Date: Sun, 1 Apr 2018 14:10:50 +0200 Subject: [PATCH] Parametrice CUDA path In some distros CUDA is not installed in /usr/local/cuda, i.e. in ArchLinux it's installed in /opt/cuda/. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1f310448..8f7562d0 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CUDNN=0 OPENCV=0 OPENMP=0 DEBUG=0 +CUDAPATH=/usr/local/cuda ARCH= -gencode arch=compute_30,code=sm_30 \ -gencode arch=compute_35,code=sm_35 \ @@ -46,9 +47,9 @@ COMMON+= `pkg-config --cflags opencv` endif ifeq ($(GPU), 1) -COMMON+= -DGPU -I/usr/local/cuda/include/ +COMMON+= -DGPU -I$(CUDAPATH)/include/ CFLAGS+= -DGPU -LDFLAGS+= -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand +LDFLAGS+= -L$(CUDAPATH)/lib64 -lcuda -lcudart -lcublas -lcurand endif ifeq ($(CUDNN), 1)