From 83006367aeec856bf8e59231c78df5b1802e3138 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sun, 17 May 2015 23:40:25 +0800 Subject: add addition and multiplication for cumatrix --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makefile') 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) -- cgit v1.2.3-70-g09d2