File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
com.oracle.truffle.r.native Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,6 @@ ifeq ($(OS_NAME), Darwin)
6464VERSION_FLAGS := -current_version $(R_VERSION ) -compatibility_version $(R_VERSION )
6565endif
6666
67- # TODO: can we remove those?
68- BLAS_TARGET := $(FASTR_LIB_DIR ) /libRblas$(DYLIB_EXT )
69- LAPACK_TARGET := $(FASTR_LIB_DIR ) /libRlapack$(DYLIB_EXT )
70-
7167all : $(R_LIB )
7268
7369# use sentinels to avoid (usually unnecessary) rebuilds.
Original file line number Diff line number Diff line change @@ -31,8 +31,14 @@ $(error no platform.mk available)
3131endif
3232endif
3333
34+ # blas and lapack implementations can be overridden using the following environment variables
35+ BLAS_LAPACK_DIR ?= $(GNUR_HOME_BINARY)/lib
36+ BLAS_SOURCE ?= $(BLAS_LAPACK_DIR)/libRblas$(DYLIB_EXT)
37+ LAPACK_SOURCE ?= $(BLAS_LAPACK_DIR)/libRlapack$(DYLIB_EXT)
38+
3439BLAS_TARGET := $(FASTR_LIB_DIR)/libRblas$(DYLIB_EXT)
3540LAPACK_TARGET := $(FASTR_LIB_DIR)/libRlapack$(DYLIB_EXT)
41+
3642# at a minimum we need to know where libpcre/libz/libgfortran/libquadmath are located,
3743# to keep the Java side simpler, we (may) copy them to $(FASTR_LIB_DIR) unless
3844# they were found in the standard system locations
@@ -47,10 +53,10 @@ $(FASTR_LIB_DIR):
4753 mkdir -p $(FASTR_LIB_DIR)
4854
4955$(BLAS_TARGET): $(GNUR_HOME_BINARY)/lib/libRblas$(DYLIB_EXT)
50- cp $(GNUR_HOME_BINARY)/lib/libRblas$(DYLIB_EXT ) $(BLAS_TARGET)
56+ cp $(BLAS_SOURCE ) $(BLAS_TARGET)
5157
5258$(LAPACK_TARGET): $(GNUR_HOME_BINARY)/lib/libRlapack$(DYLIB_EXT)
53- cp $(GNUR_HOME_BINARY)/lib/libRlapack$(DYLIB_EXT ) $(LAPACK_TARGET)
59+ cp $(LAPACK_SOURCE ) $(LAPACK_TARGET)
5460ifeq ($(OS_NAME),Darwin)
5561# libRblas depends on libgfortran, libquadmath
5662# libRlapack depends on libgfortran, libquadmath, libRblas, libR
You can’t perform that action at this time.
0 commit comments