Create a shared version of the MUMPS library. --- mumps-4.9.2.dfsg.orig/src/Makefile +++ mumps-4.9.2.dfsg/src/Makefile @@ -20,7 +20,9 @@ include $(topdir)/Makefile.inc mumps_lib: $(libdir)/libmumps_common$(PLAT).a \ - $(libdir)/lib$(ARITH)mumps$(PLAT).a + $(libdir)/libmumps_common$(PLAT).so \ + $(libdir)/lib$(ARITH)mumps$(PLAT).a \ + $(libdir)/lib$(ARITH)mumps$(PLAT).so OBJS_COMMON = \ mumps_part9.o\ @@ -55,10 +57,18 @@ $(AR) $@ $? $(RANLIB) $@ +$(libdir)/libmumps_common$(PLAT).so: $(OBJS_COMMON) + $(FC) -shared $^ -Wl,-soname,libmumps_common$(PLAT).so.4.9.2 -L$(libdir) $(LORDERINGS) -lpthread $(MUMPS_LIBF77) -o $(libdir)/libmumps_common$(PLAT).so.4.9.2 + ln -s libmumps_common$(PLAT).so.4.9.2 $@ + $(libdir)/lib$(ARITH)mumps$(PLAT).a: $(OBJS) $(AR) $@ $? $(RANLIB) $@ +$(libdir)/lib$(ARITH)mumps$(PLAT).so: $(OBJS) + $(FC) -shared $^ -Wl,-soname,lib$(ARITH)mumps$(PLAT).so.4.9.2 -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(MUMPS_LIBF77) $(LIBBLAS) $(SCALAP) -o $(libdir)/lib$(ARITH)mumps$(PLAT).so.4.9.2 + ln -s lib$(ARITH)mumps$(PLAT).so.4.9.2 $@ + $(ARITH)mumps_load.o: $(ARITH)mumps_comm_buffer.o \ $(ARITH)mumps_struc_def.o @@ -87,13 +97,13 @@ .SUFFIXES: .c .F .o .F.o: - $(FC) $(OPTF) $(INC) $(IORDERINGSF) $(ORDERINGSF) -I. -I../include -c $*.F + $(FC) $(OPTF) $(INC) $(IORDERINGSF) $(ORDERINGSF) -I. -I../include -fPIC -c $*.F .c.o: - $(CC) $(OPTC) $(INC) -I../include $(CDEFS) $(IORDERINGSC) $(ORDERINGSC) -c $*.c + $(CC) $(OPTC) $(INC) -I../include $(CDEFS) $(IORDERINGSC) $(ORDERINGSC) -fPIC -c $*.c $(ARITH)mumps_c.o: mumps_c.c $(CC) $(OPTC) $(INC) $(CDEFS) -DMUMPS_ARITH=MUMPS_ARITH_$(ARITH) \ - $(IORDERINGSC) $(ORDERINGSC) -I../include -c $? -o $@ + $(IORDERINGSC) $(ORDERINGSC) -I../include -fPIC -c $? -o $@ clean: