1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Description: add soname
Index: magma/Makefile
===================================================================
--- magma.orig/Makefile
+++ magma/Makefile
@@ -931,7 +931,9 @@ ifneq ($(have_fpic),)
@echo "===== shared library $@"
$(CXX) $(LDFLAGS) -shared -o $@ \
$^ \
- -L./lib $(LIBS)
+ -L./lib $(LIBS) -Wl,--soname,libmagma.so.2
+ mv $(libmagma_so) $(libmagma_so).2
+ ln -s $$(basename $(libmagma_so).2) $(libmagma_so)
@echo
# Can't add -Llib -lmagma to LIBS, because that would apply to libsparse_so's
@@ -941,7 +943,9 @@ ifneq ($(have_fpic),)
@echo "===== shared library $@"
$(CXX) $(LDFLAGS) -shared -o $@ \
$^ \
- -L./lib $(LIBS) -lmagma
+ -L./lib $(LIBS) -lmagma -Wl,--soname,libmagma_sparse.so.2
+ mv $(libsparse_so) $(libsparse_so).2
+ ln -s $$(basename $(libsparse_so).2) $(libsparse_so)
@echo
else
# missing -fPIC: "make shared" prints warning
@@ -1002,7 +1006,7 @@ install: lib sparse-lib install_dirs
cp include/*.h $(DESTDIR)$(prefix)/include
cp include/*.mod $(DESTDIR)$(prefix)/include
cp $(SPARSE_DIR)/include/*.h $(DESTDIR)$(prefix)/include
- cp $(libs) $(DESTDIR)$(prefix)/lib$(LIB_SUFFIX)
+ cp -dR lib/*.a lib/*.so lib/*.so.* $(DESTDIR)$(prefix)/lib$(LIB_SUFFIX)
${MAKE} pkgconfig
pkgconfig:
|