1 Create static and shared versions of the PORD library.
3 Index: mumps/PORD/lib/Makefile
4 ===================================================================
5 --- mumps.orig/PORD/lib/Makefile
6 +++ mumps/PORD/lib/Makefile
9 INCLUDES = -I../include
11 -COPTIONS = $(INCLUDES) $(CFLAGS) $(OPTFLAGS)
12 +COPTIONS = $(INCLUDES) $(CFLAGS) $(OPTFLAGS) -fPIC
14 OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o \
15 multisector.o gelim.o bucket.o tree.o \
16 @@ -24,12 +24,16 @@ OBJS = graph.o gbipart.o gbisect.o ddcre
18 $(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
20 -libpord$(LIBEXT):$(OBJS)
22 +libpord$(PLAT).a:$(OBJS)
26 +libpord$(PLAT).so: $(OBJS)
27 + $(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT)-5.1.2.so -o libpord$(PLAT)-5.1.2.so -Wl,-z,defs
28 + ln -s libpord$(PLAT)-5.1.2.so $@
35 + rm -f *.o libpord*.a *.so
37 ===================================================================
38 --- mumps.orig/Makefile
40 @@ -54,7 +54,7 @@ dexamples: d
41 multi_example: s d c z
42 (cd examples ; $(MAKE) multi)
44 -requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
45 +requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT).a $(libdir)/libpord$(PLAT).so
47 # dummy MPI library (sequential version)
49 @@ -62,19 +62,25 @@ libseqneeded:
52 # Build the libpord.a library and copy it into $(topdir)/lib
53 -$(libdir)/libpord$(PLAT)$(LIBEXT):
54 +$(libdir)/libpord$(PLAT).a:
55 if [ "$(LPORDDIR)" != "" ] ; then \
57 $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT); \
59 if [ "$(LPORDDIR)" != "" ] ; then \
60 - cp $(LPORDDIR)/libpord$(LIBEXT) $@; \
61 + cp $(LPORDDIR)/libpord$(PLAT).a $@; \
64 +$(libdir)/libpord$(PLAT).so:
65 + if [ "$(LPORDDIR)" != "" ] ; then \
66 + cd $(LPORDDIR); make CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" ARFUNCT= RANLIB="$(RANLIB)" libpord$(PLAT).so; fi;
67 + if [ "$(LPORDDIR)" != "" ] ; then \
68 + cp -a $(LPORDDIR)/libpord*.so lib/; fi;
71 (cd src; $(MAKE) clean)
72 (cd examples; $(MAKE) clean)
73 - (cd $(libdir); $(RM) *$(PLAT)$(LIBEXT))
74 + (cd $(libdir); $(RM) *$(PLAT).a *$(PLAT).so)
75 (cd libseq; $(MAKE) clean)
76 if [ "$(LPORDDIR)" != "" ] ; then \
77 cd $(LPORDDIR); $(MAKE) realclean; \