diff options
Diffstat (limited to 'nerv/Makefile')
-rw-r--r-- | nerv/Makefile | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nerv/Makefile b/nerv/Makefile index a2155b9..9ef3212 100644 --- a/nerv/Makefile +++ b/nerv/Makefile @@ -39,12 +39,11 @@ LUA_LIBS := matrix/init.lua io/init.lua init.lua \ tnn/init.lua tnn/sutil.lua tnn/tnn.lua INCLUDE := -I $(LUA_INCDIR) -DLUA_USE_APICHECK -#CUDA_BASE := /usr/local/cuda-7.0 -CUDA_BASE := /usr/local/cuda CUDA_INCLUDE := -I $(CUDA_BASE)/include/ INCLUDE += $(CUDA_INCLUDE) -LDFLAGS := -L$(CUDA_BASE)/lib64/ -Wl,-rpath=$(CUDA_BASE)/lib64/ -lcudart -lcublas -lcurand +CUDA_LDFLAGS := -L$(CUDA_BASE)/lib64/ -Wl,-rpath=$(CUDA_BASE)/lib64/ -lcudart -lcublas -lcurand + NVCC := $(CUDA_BASE)/bin/nvcc EMPTY := SPACE := $(EMPTY) $(EMPTY) @@ -65,11 +64,11 @@ $(LUA_DIR)/%.lua: %.lua cp $< $@ $(LIB_PATH)/libnervcore.so: $(CORE_OBJS) - gcc -shared -o $@ $^ $(LDFLAGS) -lcblas + gcc -shared -o $@ $^ $(LDFLAGS) $(CUDA_LDFLAGS) $(BLAS_LDFLAGS) $(LIB_PATH)/libluaT.so: $(LUAT_OBJS) - gcc -shared -o $@ $^ $(LDFLAGS) + gcc -shared -o $@ $^ $(INST_LIBDIR)/libnerv.so: $(NERV_OBJS) $(LIB_PATH)/libnervcore.so $(LIB_PATH)/libluaT.so - gcc -shared -o $@ $(NERV_OBJS) $(LDFLAGS) -Wl,-rpath=$(LIB_PATH) -L$(LIB_PATH) -lnervcore -lluaT + gcc -shared -o $@ $(NERV_OBJS) -Wl,-rpath=$(LIB_PATH) -L$(LIB_PATH) -lnervcore -lluaT $(OBJ_DIR)/matrix/cumatrix.o: matrix/generic/cumatrix.c matrix/generic/matrix.c $(OBJ_DIR)/matrix/mmatrix.o: matrix/generic/mmatrix.c matrix/generic/matrix.c |