make MKL switch surprise-proof
authorEvan Shelhamer <shelhamer@imaginarynumber.net>
Tue, 18 Feb 2014 19:10:23 +0000 (11:10 -0800)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>
Fri, 21 Mar 2014 20:52:36 +0000 (13:52 -0700)
Makefile
Makefile.config.example

index 743a55f..9f2e91c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -99,8 +99,9 @@ WARNINGS := -Wall
 
 COMMON_FLAGS := -DNDEBUG -O2
 
-# MKL switch
-ifdef USE_MKL
+# MKL switch (default = non-MKL)
+USE_MKL ?= 0
+ifeq ($(USE_MKL), 1)
   LIBRARIES += mkl_rt
   COMMON_FLAGS += -DUSE_MKL
   INCLUDE_DIRS += $(MKL_INCLUDE_DIR)
index 38af560..95656dd 100644 (file)
@@ -10,8 +10,8 @@ CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
     -gencode arch=compute_30,code=sm_30 \
     -gencode arch=compute_35,code=sm_35
 
-# If using MKL, uncomment the following line
-# USE_MKL := 1
+# MKL switch: set to 1 for MKL
+USE_MKL := 0
 # MKL directory contains include/ and lib/ directions that we need.
 MKL_DIR := /opt/intel/mkl