aboutsummaryrefslogtreecommitdiff
path: root/nerv/Makefile
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2016-03-02 21:21:30 +0800
committerDeterminant <ted.sybil@gmail.com>2016-03-02 21:21:30 +0800
commitc964d74b1927ffd9fd431f457f7e385b2d2ba5ba (patch)
tree7977869252be2cb62a37b1c12a950256f5b24b2d /nerv/Makefile
parentad704f2623cc9e0a5d702434bfdebc345465ca12 (diff)
...
Diffstat (limited to 'nerv/Makefile')
-rw-r--r--nerv/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/nerv/Makefile b/nerv/Makefile
index 46e79a0..e8bcad2 100644
--- a/nerv/Makefile
+++ b/nerv/Makefile
@@ -1,3 +1,11 @@
+ifndef LUA_BINDIR
+$(error Please build the package via luarocks: `luarocks make`)
+endif
+
+ifndef CUDA_BASE
+$(error CUDA_BASE is not set)
+endif
+
.PHONY: build install clean
SHELL := /bin/bash
@@ -43,6 +51,7 @@ CUDA_INCLUDE := -I $(CUDA_BASE)/include/
INCLUDE += $(CUDA_INCLUDE)
CUDA_LDFLAGS := -L$(CUDA_BASE)/lib64/ -Wl,-rpath=$(CUDA_BASE)/lib64/ -lcudart -lcuda -lcublas -lcurand
+override CFLAGS += $(NERV_FEAT)
NVCC := $(CUDA_BASE)/bin/nvcc
EMPTY :=