3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
guix/gnu/packages/patches/mumps-shared-libseq.patch
Maurice Bremond 8cd2a395c7
gnu: mumps: Change "5.1.2" to "5.2.1" in library file names.
* gnu/packages/patches/mumps-shared-libseq.patch,
gnu/packages/patches/mumps-shared-mumps.patch,
gnu/packages/patches/mumps-shared-pord.patch: Replace "5.1.2" with
"5.2.1" in file names.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-02-14 23:01:47 +01:00

42 lines
1.3 KiB
Diff

Create a shared version of the sequential library, MUST BE LAST IN SERIES
Index: mumps/libseq/Makefile
===================================================================
--- mumps.orig/libseq/Makefile
+++ mumps/libseq/Makefile
@@ -8,15 +8,17 @@ all: libmpiseq
include ../Makefile.inc
-libmpiseq: libmpiseq$(PLAT)$(LIBEXT)
+libmpiseq: libmpiseq$(PLAT).a libmpiseq$(PLAT).so
-libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
- $(AR)$@ mpi.o mpic.o elapse.o
+libmpiseq$(PLAT).a: mpi.o mpic.o elapse.o
+ $(AR) $@ mpi.o mpic.o elapse.o
$(RANLIB) $@
+libmpiseq$(PLAT).so: mpi.o mpic.o elapse.o
+ $(FC) -shared $^ -Wl,-soname,libmpiseq$(PLAT)-5.2.1.so -o libmpiseq$(PLAT)-5.2.1.so -Wl,-z,defs
.f.o:
- $(FC) $(OPTF) -c $*.f $(OUTF)$*.o
+ $(FC) $(OPTF) -fPIC -c $*.f $(OUTF)$*.o
.c.o:
- $(CC) $(OPTC) $(CDEFS) -I. -c $*.c $(OUTC)$*.o
+ $(CC) $(OPTC) $(CDEFS) -I. -fPIC -c $*.c $(OUTC)$*.o
clean:
- $(RM) *.o *$(LIBEXT)
+ $(RM) *.o *.a *.so
Index: mumps/Makefile
===================================================================
--- mumps.orig/Makefile
+++ mumps/Makefile
@@ -60,6 +60,7 @@ requiredobj: Makefile.inc $(LIBSEQNEEDED
libseqneeded:
(cd libseq; $(MAKE))
+ cp libseq/lib* $(libdir)
# Build the libpord.a library and copy it into $(topdir)/lib
$(libdir)/libpord$(PLAT).a: