Skip to content
Snippets Groups Projects
Commit f1045a61 authored by Mick Jordan's avatar Mick Jordan
Browse files

make .dylib id absolute; fixes install of packages that reference Rblas etc.

parent 327e32c4
No related branches found
No related tags found
No related merge requests found
...@@ -21,10 +21,14 @@ ...@@ -21,10 +21,14 @@
# questions. # questions.
# #
# Copies the Blas and lapack libraries and builds the pcre library # Copies the Blas and lapack libraries and (maybe) builds the pcre library
ifneq ($(MAKECMDGOALS),clean) ifneq (,$(wildcard $(TOPDIR)/platform.mk))
include $(TOPDIR)/platform.mk include $(TOPDIR)/platform.mk
else
ifneq ($(MAKECMDGOALS),clean)
$(error no platform.mk available)
endif
endif endif
TARGET_DIR := $(abspath $(TOPDIR)/../lib) TARGET_DIR := $(abspath $(TOPDIR)/../lib)
...@@ -45,6 +49,8 @@ $(LAPACK_TARGET): $(GNUR_HOME)/lib/libRlapack$(DYLIB_EXT) ...@@ -45,6 +49,8 @@ $(LAPACK_TARGET): $(GNUR_HOME)/lib/libRlapack$(DYLIB_EXT)
ifeq ($(OS_NAME),Darwin) ifeq ($(OS_NAME),Darwin)
install_name_tool -change libRblas.dylib $(BLAS_TARGET) $(LAPACK_TARGET) install_name_tool -change libRblas.dylib $(BLAS_TARGET) $(LAPACK_TARGET)
install_name_tool -change libR.dylib $(TARGET_DIR)/libR.dylib $(LAPACK_TARGET) install_name_tool -change libR.dylib $(TARGET_DIR)/libR.dylib $(LAPACK_TARGET)
install_name_tool -id $(BLAS_TARGET) $(BLAS_TARGET)
install_name_tool -id $(LAPACK_TARGET) $(LAPACK_TARGET)
endif endif
PCRE_OBJS := $(wildcard $(GNUR_HOME)/src/extra/pcre/pcre_*.o) PCRE_OBJS := $(wildcard $(GNUR_HOME)/src/extra/pcre/pcre_*.o)
......
...@@ -108,6 +108,9 @@ $(LIB_PKG): $(C_OBJECTS) $(F_OBJECTS) $(GNUR_C_OBJECTS) $(GNUR_F_OBJECTS) $(PKGD ...@@ -108,6 +108,9 @@ $(LIB_PKG): $(C_OBJECTS) $(F_OBJECTS) $(GNUR_C_OBJECTS) $(GNUR_F_OBJECTS) $(PKGD
$(DYLIB_LD) $(DYLIB_LDFLAGS) -o $(LIB_PKG) $(C_OBJECTS) $(F_OBJECTS) $(GNUR_C_OBJECTS) $(GNUR_F_OBJECTS) $(PKG_LIBS) $(DYLIB_LD) $(DYLIB_LDFLAGS) -o $(LIB_PKG) $(C_OBJECTS) $(F_OBJECTS) $(GNUR_C_OBJECTS) $(GNUR_F_OBJECTS) $(PKG_LIBS)
mkdir -p $(FASTR_LIBRARY_DIR)/$(PKG)/libs mkdir -p $(FASTR_LIBRARY_DIR)/$(PKG)/libs
cp $(LIB_PKG) $(FASTR_LIBRARY_DIR)/$(PKG)/libs cp $(LIB_PKG) $(FASTR_LIBRARY_DIR)/$(PKG)/libs
ifeq ($(OS_NAME),Darwin)
install_name_tool -id $(FASTR_LIBRARY_DIR)/$(PKG)/libs/$(PKG).so $(FASTR_LIBRARY_DIR)/$(PKG)/libs/$(PKG).so
endif
$(OBJ)/%.o: $(SRC)/%.c $(H_SOURCES) $(OBJ)/%.o: $(SRC)/%.c $(H_SOURCES)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
......
...@@ -26,12 +26,11 @@ ...@@ -26,12 +26,11 @@
# GnuR stats library source - those that do not depend on GnuR internals (always true for .f) # GnuR stats library source - those that do not depend on GnuR internals (always true for .f)
# Also do some necessary modifications to a copy of fft.c. # Also do some necessary modifications to a copy of fft.c.
.PHONY: cleanpkg nametool .PHONY: cleanpkg
GNUR_FFT = $(addprefix $(GNUR_HOME)/src/library/stats/src/, fft.c) GNUR_FFT = $(addprefix $(GNUR_HOME)/src/library/stats/src/, fft.c)
FFT_OBJECT = $(addprefix $(OBJ)/, fft.o) FFT_OBJECT = $(addprefix $(OBJ)/, fft.o)
LIB_PKG_PRE = $(FFT_OBJECT) LIB_PKG_PRE = $(FFT_OBJECT)
LIB_PKG_POST = nametool
CLEAN_PKG := cleanpkg CLEAN_PKG := cleanpkg
...@@ -71,12 +70,5 @@ $(OBJ)/%.o: $(GNUR_SRC)/%.c ...@@ -71,12 +70,5 @@ $(OBJ)/%.o: $(GNUR_SRC)/%.c
$(OBJ)/%.o: $(GNUR_SRC)/%.f $(OBJ)/%.o: $(GNUR_SRC)/%.f
$(F77) $(FFLAGS) $(FPICFLAGS) -c $< -o $@ $(F77) $(FFLAGS) $(FPICFLAGS) -c $< -o $@
# ensure that the references to Rblas, Rlapack and appl are absolute
nametool:
ifeq ($(OS_NAME),Darwin)
install_name_tool -change libRblas.dylib $(FASTR_R_HOME)/lib/libRblas.dylib $(FASTR_LIBRARY_DIR)/$(PKG)/libs/$(PKG).so
install_name_tool -change libRlapack.dylib $(FASTR_R_HOME)/lib/libRlapack.dylib $(FASTR_LIBRARY_DIR)/$(PKG)/libs/$(PKG).so
endif
cleanpkg: cleanpkg:
rm -f $(SRC)/fft.c rm -f $(SRC)/fft.c
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment