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

Ensure libR has dependency on libRblas; some Makefile cleanup

parent f12a2602
No related branches found
No related tags found
No related merge requests found
#
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -40,10 +40,15 @@ ifeq ($(OS_NAME), Darwin)
VERSION_FLAGS := -current_version $(R_VERSION) -compatibility_version $(R_VERSION)
endif
BLAS_TARGET := $(FASTR_LIB_DIR)/libRblas$(DYLIB_EXT)
all: $(C_LIB)
$(C_LIB): objs
$(DYLIB_LD) $(DYLIB_LDFLAGS) -o $(C_LIB) $(wildcard lib/*.o) $(VERSION_FLAGS)
$(DYLIB_LD) $(DYLIB_LDFLAGS) -o $(C_LIB) $(wildcard lib/*.o) -L $(GNUR_HOME)/lib -lRblas $(VERSION_FLAGS)
ifeq ($(OS_NAME),Darwin)
install_name_tool -change libRblas.dylib $(BLAS_TARGET) $(C_LIB)
endif
objs:
$(MAKE) -C src/common all
......
#
# Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -21,7 +21,7 @@
# questions.
#
# Copies the Blas and lapack libraries and (maybe) builds the pcre library
# Copies the Blas and lapack libraries
ifneq (,$(wildcard $(TOPDIR)/platform.mk))
include $(TOPDIR)/platform.mk
......@@ -31,15 +31,13 @@ $(error no platform.mk available)
endif
endif
TARGET_DIR := $(abspath $(TOPDIR)/../lib)
BLAS_TARGET := $(TARGET_DIR)/libRblas$(DYLIB_EXT)
LAPACK_TARGET := $(TARGET_DIR)/libRlapack$(DYLIB_EXT)
PCRE_TARGET := $(TARGET_DIR)/libpcre$(DYLIB_EXT)
BLAS_TARGET := $(FASTR_LIB_DIR)/libRblas$(DYLIB_EXT)
LAPACK_TARGET := $(FASTR_LIB_DIR)/libRlapack$(DYLIB_EXT)
all: $(TARGET_DIR) $(BLAS_TARGET) $(LAPACK_TARGET)
all: $(FASTR_LIB_DIR) $(BLAS_TARGET) $(LAPACK_TARGET)
$(TARGET_DIR):
mkdir -p $(TARGET_DIR)
$(FASTR_LIB_DIR):
mkdir -p $(FASTR_LIB_DIR)
$(BLAS_TARGET): $(GNUR_HOME)/lib/libRblas$(DYLIB_EXT)
cp $(GNUR_HOME)/lib/libRblas$(DYLIB_EXT) $(BLAS_TARGET)
......@@ -48,17 +46,12 @@ $(LAPACK_TARGET): $(GNUR_HOME)/lib/libRlapack$(DYLIB_EXT)
cp $(GNUR_HOME)/lib/libRlapack$(DYLIB_EXT) $(LAPACK_TARGET)
ifeq ($(OS_NAME),Darwin)
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 $(FASTR_LIB_DIR)/libR.dylib $(LAPACK_TARGET)
install_name_tool -id $(BLAS_TARGET) $(BLAS_TARGET)
install_name_tool -id $(LAPACK_TARGET) $(LAPACK_TARGET)
endif
PCRE_OBJS := $(wildcard $(GNUR_HOME)/src/extra/pcre/pcre_*.o)
$(PCRE_TARGET): $(PCRE_OBJS) $(TOPDIR)/platform.mk
$(DYLIB_LD) $(DYLIB_LDFLAGS) -o $(PCRE_TARGET) $(PCRE_OBJS)
clean:
rm -f $(BLAS_TARGET) $(LAPACK_TARGET) $(PCRE_TARGET)
rm -f $(BLAS_TARGET) $(LAPACK_TARGET)
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