| 1 |
# Downloading and compiling extra libraries |
| 2 |
# ----------------------------------------- |
| 3 |
|
| 4 |
include SLmake.inc |
| 5 |
|
| 6 |
all-local: scalapack |
| 7 |
|
| 8 |
# FFCS: parallel compilation crashes on Win32 (same archive updated from 2 different parallel makes) |
| 9 |
|
| 10 |
# Downloading and compiling scalapack |
| 11 |
# ------------------------------ |
| 12 |
# http://www.netlib.org/scalapack/ |
| 13 |
# Hips information |
| 14 |
DIRPKG=../pkg |
| 15 |
SRCDIR=scalapack-2.1.0 |
| 16 |
PACKAGE1=$(DIRPKG)/scalapack-2.1.0.tgz |
| 17 |
SERVER=http://www.netlib.org/scalapack/ |
| 18 |
INSTALL=../.. |
| 19 |
|
| 20 |
# FFCS: shorten argument length to avoid "sh: ../ar: Argument list too long" under Cygwin |
| 21 |
DIR1 = TOOLS/LAPACK/*.o |
| 22 |
DIR2 = TOOLS/*.o |
| 23 |
DIR3 = PBLAS/SRC/PBBLAS/*.o |
| 24 |
DIR4 = PBLAS/SRC/PTZBLAS/*.o |
| 25 |
DIR5 = PBLAS/SRC/PTOOLS/*.o |
| 26 |
DIR6 = PBLAS/SRC/*.o |
| 27 |
DIR7 = REDIST/SRC/*.o |
| 28 |
DIR8 = SRC/*.o |
| 29 |
DIR9 = BLACS/SRC/*.o BLACS/SRC/*.oo |
| 30 |
|
| 31 |
scalapack: FAIRE |
| 32 |
|
| 33 |
# FFCS: shorten argument length to avoid "sh: ../ar: Argument list too long" under Cygwin |
| 34 |
$(SRCDIR)/FAIT-202:$(SRCDIR)/tag-tar |
| 35 |
cp SLmake.inc $(SRCDIR) |
| 36 |
cd $(SRCDIR);$(MAKE) MAKEFLAGS=-j1 lib |
| 37 |
rm $(SRCDIR)/libscalapack.a |
| 38 |
|
| 39 |
|
| 40 |
cd $(SRCDIR) && $(ARCH) $(ARCHFLAGS) libscalapack.a $(DIR1) $(DIR2) $(DIR3) $(DIR4) $(DIR5) $(DIR6) $(DIR7) $(DIR8) $(DIR9) |
| 41 |
$(RANLIB) $(SRCDIR)/libscalapack.a |
| 42 |
touch $(SRCDIR)/FAIT-202 |
| 43 |
install: |
| 44 |
mkdir -p ../include |
| 45 |
cp $(SRCDIR)/SRC/*.h ../include |
| 46 |
mkdir -p ../lib |
| 47 |
cp $(SRCDIR)/libscalapack.a ../lib |
| 48 |
|
| 49 |
WHERE: |
| 50 |
if [ -f $(SRCDIR)/FAIT-202 ] ; then \ |
| 51 |
make install; \ |
| 52 |
echo scalapack LD -L@DIR@/lib -lscalapack >../lib/WHERE.scalapack ;\ |
| 53 |
echo scalapack INCLUDE -I@DIR@/include >> ../lib/WHERE.scalapack ;\ |
| 54 |
fi |
| 55 |
|
| 56 |
FAIRE: $(SRCDIR)/FAIT-202 |
| 57 |
$(MAKE) WHERE |
| 58 |
touch FAIRE |
| 59 |
|
| 60 |
SLmake.inc: ../../config.status Makefile SLmake-scalapack.inc |
| 61 |
../../config.status --file="SLmake.inc:SLmake-scalapack.inc" |
| 62 |
|
| 63 |
$(SRCDIR)/tag-tar: $(PACKAGE1) |
| 64 |
gunzip -c $(PACKAGE1) | tar xf - |
| 65 |
touch $(SRCDIR)/tag-tar |
| 66 |
|
| 67 |
$(PACKAGE1): |
| 68 |
../getall -o ScaLAPACK -a |
| 69 |
|
| 70 |
clean: |
| 71 |
# FFCS - need to clean completely even in case of error |
| 72 |
-rm SLmake.inc FAIRE FAIT |
| 73 |
# FFCS - make sure that all directories are cleaned. Thisis especially important under Windows because there is no |
| 74 |
# compilation dependencies control there (see |
| 75 |
# [[file:c:/cygwin/home/alh/ffcs/dist/configure.ac::dependency_tracking]]) |
| 76 |
-rm -rf scalapack-* |
| 77 |
-rm config.log |
| 78 |
# -rm $(PACKAGE1) |
| 79 |
|
| 80 |
.PHONY:$(SRCDIR)/$(INSTALL) |