superlu/superlu-3.0.diff

99 lines
2.6 KiB
Diff

Index: SuperLU_3.0/Makefile
===================================================================
--- SuperLU_3.0.orig/Makefile
+++ SuperLU_3.0/Makefile
@@ -14,8 +14,12 @@
# October 15, 2003 Version 3.0
#
############################################################################
+DESTDIR =
+LIBDIR = $(prefix)/lib
+DESTLIBDIR = $(DESTDIR)/$(LIBDIR)
+
include make.inc
all: install lib testing
@@ -36,8 +40,18 @@ superlulib:
tmglib:
( cd TESTING/MATGEN; $(MAKE) )
+install_lib: superlulib
+ $(INSTALL) -m 0755 -d $(DESTLIBDIR)
+ $(INSTALL) -m 0644 superlu$(PLAT).a $(DESTLIBDIR)/libsuperlu.a
+ ln -sf libsuperlu.a $(DESTLIBDIR)/superlu$(PLAT).a
+
+install_blas: blas$(PLAT).a
+ $(INSTALL) -m 0755 -d $(DESTLIBDIR)
+ $(INSTALL) -m 0644 blas$(PLAT).a $(DESTLIBDIR)/libblas2.a
+ ln -sf libblas2.a $(DESTLIBDIR)/blas2$(PLAT).a
+
matlabmex:
( cd MATLAB; $(MAKE) )
testing:
Index: SuperLU_3.0/make.inc
===================================================================
--- SuperLU_3.0.orig/make.inc
+++ SuperLU_3.0/make.inc
@@ -15,36 +15,49 @@
############################################################################
#
# The machine (platform) identifier to append to the library names
#
-PLAT = _solaris
+MACH := $(shell uname -m | tr A-Z a-z | sed s§i.86§i386§)
+PLAT = _$(MACH)
+prefix = /usr
#
# The name of the libraries to be created/linked to
#
TMGLIB = tmglib$(PLAT).a
SUPERLULIB = superlu$(PLAT).a
BLASLIB = ../blas$(PLAT).a
+#BLASBLIB = -lblas
+#BLASDEF = -DUSE_VENDOR_BLAS
#
# The archiver and the flag(s) to use when building archive (library)
# If your system has no ranlib, set RANLIB = echo.
#
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
+INSTALL = install
-CC = cc
-CFLAGS = -xO3 -xcg92
-FORTRAN = f77
-FFLAGS = -O
-LOADER = cc
-LOADOPTS = -xO3
+CC = gcc
+CFLAGS = $(RPM_OPT_FLAGS) -fPIC -fschedule-insns2 \
+ -funroll-loops -fstrict-aliasing -frerun-loop-opt \
+ -ftree-vectorize -funit-at-a-time
+ifeq ($(MACH),i386)
+ CFLAGS += -mtune=pentium-m -momit-leaf-frame-pointer # -ffast-math -msse2 -mfpmath=sse
+else
+ CFLAGS += -O3 -finline-limit=720 --param max-inline-insns-auto=160
+endif
+NOOPTS = $(RPM_OPT_FLAGS) -Os -fPIC
+FORTRAN = g77
+FFLAGS = $(CFLAGS)
+LOADER = gcc
+LOADOPTS =
#
# C preprocessor defs for compilation (-DNoChange, -DAdd_, or -DUpCase)
#
CDEFS = -DAdd_
#
# The directory in which Matlab is installed
#
-MATLAB = /usr/sww/pkg/matlab
+#MATLAB = /usr/sww/pkg/matlab