nixpkgs/pkgs/development/r-modules/patches/gmatrix.patch

49 lines
1.5 KiB
Diff
Raw Normal View History

2014-11-21 14:23:36 +01:00
diff -ru -x '*~' gmatrix_orig/src/Makefile gmatrix/src/Makefile
--- gmatrix_orig/src/Makefile 2014-08-27 02:42:04.000000000 +0900
+++ gmatrix/src/Makefile 2014-10-25 15:35:29.797202981 +0900
@@ -21,6 +21,7 @@
# to the manual on the gmatrix install instructions)
CUDA_LIB_PATH ?= /usr/local/cuda/lib64
R_INC_PATH ?= /usr/include/R
+CUDA_INC_PATH ?= /usr/local/cuda/include
# Nvidia CUDA Compiler
@@ -49,25 +50,25 @@
# Build rules
build: $(OUT_OBJ)
$(R_CC) $(OUT_OBJ) -o $(OUT_SO) $(LIBS) -L$(CUDA_LIB_PATH)
-
+
conversions.o:
- $(NVCC) -c conversions.cu -o conversions.o $(NVCC_FLAGS) -I$(R_INC_PATH)
-
+ $(NVCC) -c conversions.cu -o conversions.o $(NVCC_FLAGS) -I$(R_INC_PATH) -I${CUDA_INC_PATH}
+
manipulation.o:
- $(NVCC) -c manipulation.cu -o manipulation.o $(NVCC_FLAGS) -I$(R_INC_PATH)
+ $(NVCC) -c manipulation.cu -o manipulation.o $(NVCC_FLAGS) -I$(R_INC_PATH) -I${CUDA_INC_PATH}
general.o:
- $(NVCC) -c general.cu -o general.o $(NVCC_FLAGS) -I$(R_INC_PATH)
+ $(NVCC) -c general.cu -o general.o $(NVCC_FLAGS) -I$(R_INC_PATH) -I${CUDA_INC_PATH}
matrix.o:
- $(NVCC) -c matrix.cu -o matrix.o $(NVCC_FLAGS) -I$(R_INC_PATH)
-
+ $(NVCC) -c matrix.cu -o matrix.o $(NVCC_FLAGS) -I$(R_INC_PATH) -I${CUDA_INC_PATH}
+
ops.o:
- $(NVCC) -c ops.cu -o ops.o $(NVCC_FLAGS) -I$(R_INC_PATH)
-
+ $(NVCC) -c ops.cu -o ops.o $(NVCC_FLAGS) -I$(R_INC_PATH) -I${CUDA_INC_PATH}
+
dist.o:
- $(NVCC) -c dist.cu -o dist.o $(NVCC_FLAGS) -I$(R_INC_PATH)
-
+ $(NVCC) -c dist.cu -o dist.o $(NVCC_FLAGS) -I$(R_INC_PATH) -I${CUDA_INC_PATH}
+
clean:
-rm -f *.o core