Skip to content

Commit

Permalink
Perform sanity check for OpenCL Library
Browse files Browse the repository at this point in the history
  • Loading branch information
furuame committed Sep 2, 2018
1 parent fb1bea3 commit 1423ddf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mk/opencl.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# FIXME: perform sanity checks before compilation
OPENCL_LIB ?= /usr/local/cuda/lib64
OPENCL_LIB_PATH ?= /usr/local/cuda/lib64

OPENCL_LIB := $(shell test -d $(OPENCL_LIB_PATH); echo $$?)

ifneq ($(OPENCL_LIB),0)
$(error "Please specify the path to your OpenCL library on your platform")
endif

CFLAGS += \
-DENABLE_OPENCL \
-I$(OPENCL_PATH)/include
LDFLAGS += -L$(OPENCL_LIB) -lOpenCL
-I$(OPENCL_LIB_PATH)/../include

LDFLAGS += -L$(OPENCL_LIB_PATH) -lOpenCL

0 comments on commit 1423ddf

Please sign in to comment.