Used $(CURDIR) instead of pwd in generating shared library on Mac OSX.
Add more tips about this issue. Thank Dr Kane O'Donnell.
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\"."
+ @echo "WARNING: If you plan to use the dynamic library $(LIBDYNNAME), you must run:"
+ @echo
+ @echo "\"make PREFIX=/your_installation_path/ install\"."
+ @echo
+ @echo "(or set PREFIX in Makefile.rule and run make install."
+ @echo "If you want to move the .dylib to a new location later, make sure you change"
+ @echo "the internal name of the dylib with:"
+ @echo
+ @echo "install_name_tool -id /new/absolute/path/to/$(LIBDYNNAME) $(LIBDYNNAME)"
endif
@echo
@echo "To install the library, you can run \"make PREFIX=/path/to/your/installation install\"."
-cp $(LIBSONAME) $(PREFIX)
-ln -fs $(PREFIX)/$(LIBSONAME) $(PREFIX)/libopenblas.so
endif
-ifeq ($(OSNAME), Darwin)
+ifeq ($(OSNAME), Darwin)
-cp $(LIBDYNNAME) $(PREFIX)
- -install_name_tool -add_rpath $(PREFIX)/$(LIBDYNNAME) $(PREFIX)/$(LIBDYNNAME)
+ -install_name_tool -id $(PREFIX)/$(LIBDYNNAME) $(PREFIX)/$(LIBDYNNAME)
-ln -fs $(PREFIX)/$(LIBDYNNAME) $(PREFIX)/libopenblas.dylib
endif
ifeq ($(OSNAME), WINNT)
perl ./gensymbol win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > $(@F)
$(LIBDYNNAME) : ../$(LIBNAME) osx.def
- $(CC) $(CFLAGS) -all_load -headerpad_max_install_names -install_name `pwd`/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB)
+ $(CC) $(CFLAGS) -all_load -headerpad_max_install_names -install_name $(CURDIR)/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB)
symbol.$(SUFFIX) : symbol.S
$(CC) $(CFLAGS) -c -o $(@F) $^