aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-17 23:40:25 +0800
committerDeterminant <[email protected]>2015-05-17 23:40:25 +0800
commit83006367aeec856bf8e59231c78df5b1802e3138 (patch)
treed617de84bcc11067840582ebe276d29e3851e548 /Makefile
parent902faa66e3da52a1a4cf7b1dc7da6e6bf0d47d34 (diff)
add addition and multiplication for cumatrix
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 33219ce..4514263 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,10 @@ OBJS := oop_example.o nerv.o luaT.o common.o matrix/matrix.o matrix/cumatrix.o m
LIBS := libnerv.so
LUA_LIBS := matrix/init.lua nerv.lua
INCLUDE := -I build/luajit-2.0/include/luajit-2.0/ -DLUA_USE_APICHECK
-LDFLAGS := -L luajit-2.0/build/lib/ -llua -lm
+CUDA_BASE := /usr/local/cuda-6.5
+CUDA_INCLUDE := -I $(CUDA_BASE)/include/
+INCLUDE += $(CUDA_INCLUDE)
+LDFLAGS := -L$(CUDA_BASE)/lib64/ -Wl,-rpath=$(CUDA_BASE)/lib64/ -lcudart -lcublas
CFLAGS :=
OBJ_DIR := build/objs
LUA_DIR := build/lua
@@ -30,7 +33,7 @@ $(LUA_DIR)/%.lua: %.lua
$(OBJ_DIR)/luaT.o:
gcc -c -o $@ luaT/luaT.c $(INCLUDE) -fPIC
$(LIBS): $(OBJS)
- gcc -shared -o $@ $(OBJS)
+ gcc -shared -o $@ $(OBJS) $(LDFLAGS)
clean:
-rm -rf $(OBJ_DIR)
-rm -rf $(LUA_DIR)