freebsd-ports/math/superlu/files/patch-SRC-Makefile
Maho Nakata 2d9be844d8 Better handling of shared lib.
PR:	166703
Submitted by:	Oliver Hartmann <ohartman@zedat.fu-berlin.de>
2012-04-25 07:09:18 +00:00

59 lines
2.1 KiB
Text

--- SRC/Makefile.orig 2006-01-06 00:09:14.000000000 +0100
+++ SRC/Makefile 2012-04-06 20:56:28.000000000 +0200
@@ -89,39 +89,47 @@
zcolumn_dfs.o zcolumn_bmod.o zpivotL.o zpruneL.o \
zmemory.o zutil.o zmyblas2.o
-all: single double complex complex16
+all: single double complex complex16 shared
single: $(SLUSRC) $(ALLAUX) $(LAAUX) $(SLASRC) $(SCLAUX)
- $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) \
+ $(ARCMD) $(ARCHFLAGS) ../$(SUPERLULIB) \
$(SLUSRC) $(ALLAUX) $(LAAUX) $(SLASRC) $(SCLAUX)
$(RANLIB) ../$(SUPERLULIB)
double: $(DLUSRC) $(ALLAUX) $(LAAUX) $(DLASRC) $(DZLAUX)
- $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) \
+ $(ARCMD) $(ARCHFLAGS) ../$(SUPERLULIB) \
$(DLUSRC) $(ALLAUX) $(LAAUX) $(DLASRC) $(DZLAUX)
$(RANLIB) ../$(SUPERLULIB)
complex: $(CLUSRC) $(ALLAUX) $(LAAUX) $(CLASRC) $(SCLAUX)
- $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) \
+ $(ARCMD) $(ARCHFLAGS) ../$(SUPERLULIB) \
$(CLUSRC) $(ALLAUX) $(LAAUX) $(CLASRC) $(SCLAUX)
$(RANLIB) ../$(SUPERLULIB)
complex16: $(ZLUSRC) $(ALLAUX) $(LAAUX) $(ZLASRC) $(DZLAUX)
- $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) \
+ $(ARCMD) $(ARCHFLAGS) ../$(SUPERLULIB) \
$(ZLUSRC) $(ALLAUX) $(LAAUX) $(ZLASRC) $(DZLAUX)
$(RANLIB) ../$(SUPERLULIB)
+shared: single double complex complex16
+ $(CC) -shared -Wl,-soname=$(SUPERLULIB_SHARED) -o ../$(SUPERLULIB_SHARED) \
+ $(ALLAUX) $(LAAUX) $(SCLAUX) $(DZLAUX) \
+ $(SLUSRC) $(SLASRC) \
+ $(DLUSRC) $(DLASRC) \
+ $(CLUSRC) $(CLASRC) \
+ $(ZLUSRC) $(ZLASRC)
+
##################################
# Do not optimize these routines #
##################################
-slamch.o: slamch.c ; $(CC) -c $(NOOPTS) $(CDEFS) $<
-dlamch.o: dlamch.c ; $(CC) -c $(NOOPTS) $(CDEFS) $<
-superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) $<
+slamch.o: slamch.c ; $(CC) -fpic -c $(NOOPTS) $(CDEFS) $<
+dlamch.o: dlamch.c ; $(CC) -fpic -c $(NOOPTS) $(CDEFS) $<
+superlu_timer.o: superlu_timer.c ; $(CC) -fpic -c $(NOOPTS) $<
##################################
.c.o:
$(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) -c $< $(VERBOSE)
clean:
- rm -f *.o ../libsuperlu_3.0.a
+ rm -f *.o ../libsuperlu_3.0.a ../libsuperlu_3.0.so