Browse Source

Refs #57. The bug about absolute path of shared library on Mac OSX.

OSX cann't use relative path in shared library. Thank Mr.Kane for this patch. The detail is in this link (https://github.com/xianyi/OpenBLAS/issues/57).
tags/v0.1alpha2.4^2
Xianyi 14 years ago
parent
commit
68cae521df
3 changed files with 7 additions and 1 deletions
  1. +5
    -0
      Makefile
  2. +1
    -0
      Makefile.install
  3. +1
    -1
      exports/Makefile

+ 5
- 0
Makefile View File

@@ -56,6 +56,11 @@ ifndef SMP
else
@echo " (Multi threaded; Max num-threads is $(NUM_THREADS))"
endif

ifeq ($(OSNAME), Darwin)
@echo "Because absolute path issue, $(LIBDYNNAME) may not work under this directory."
@echo "Thus, you need run \"make PREFIX=/your_installation_path/ install\"."
endif
@echo

shared :


+ 1
- 0
Makefile.install View File

@@ -50,6 +50,7 @@ ifeq ($(OSNAME), NetBSD)
endif
ifeq ($(OSNAME), Darwin)
-cp $(LIBDYNNAME) $(PREFIX)
-install_name_tool -add_rpath $(PREFIX)/$(LIBDYNNAME) $(PREFIX)/$(LIBDYNNAME)
-ln -fs $(PREFIX)/$(LIBDYNNAME) $(PREFIX)/libopenblas.dylib
endif
ifeq ($(OSNAME), WINNT)


+ 1
- 1
exports/Makefile View File

@@ -85,7 +85,7 @@ libgoto_hpl.def : gensymbol
perl ./gensymbol win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > $(@F)

$(LIBDYNNAME) : ../$(LIBNAME) osx.def
$(PREFIX)gcc $(CFLAGS) -all_load -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB)
$(CC) $(CFLAGS) -all_load -headerpad_max_install_names -install_name `pwd`/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB)

symbol.$(SUFFIX) : symbol.S
$(CC) $(CFLAGS) -c -o $(@F) $^


Loading…
Cancel
Save