mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
set CUDA library search path for Mac OS X
darknet failed to build on Mac OS X, because the Makefile passed an incorrect library search path for locating CUDA libraries. On Mac OS X, CUDA library installation path is /usr/local/cuda/lib by default. This patch fixed the issue.
This commit is contained in:
parent
80d9bec20f
commit
74826c56a2
8
Makefile
8
Makefile
@ -19,6 +19,7 @@ ALIB=libdarknet.a
|
|||||||
EXEC=darknet
|
EXEC=darknet
|
||||||
OBJDIR=./obj/
|
OBJDIR=./obj/
|
||||||
|
|
||||||
|
OS=$(shell uname -s)
|
||||||
CC=gcc
|
CC=gcc
|
||||||
NVCC=nvcc
|
NVCC=nvcc
|
||||||
AR=ar
|
AR=ar
|
||||||
@ -48,7 +49,12 @@ endif
|
|||||||
ifeq ($(GPU), 1)
|
ifeq ($(GPU), 1)
|
||||||
COMMON+= -DGPU -I/usr/local/cuda/include/
|
COMMON+= -DGPU -I/usr/local/cuda/include/
|
||||||
CFLAGS+= -DGPU
|
CFLAGS+= -DGPU
|
||||||
LDFLAGS+= -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand
|
ifeq ($(OS), Darwin)
|
||||||
|
LDFLAGS+= -L/usr/local/cuda/lib
|
||||||
|
else
|
||||||
|
LDFLAGS+= -L/usr/local/cuda/lib64
|
||||||
|
endif
|
||||||
|
LDFLAGS+=-lcuda -lcudart -lcublas -lcurand
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CUDNN), 1)
|
ifeq ($(CUDNN), 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user