1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00
nixpkgs/pkgs/development/r-modules/patches/gmatrix.patch
2014-12-03 16:28:28 +01:00

49 lines
1.5 KiB
Diff

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