Mercurial > mxe-octave
annotate src/suitesparse.mk @ 3551:1f81856eba40
suitesparse: update to 4.1.2
* src/suitesparse.mk: update to 4.1.2.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Tue, 25 Feb 2014 18:22:22 -0500 |
parents | c21ca79d7980 |
children | c27b154dab6c |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
2240
diff
changeset
|
1 # This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
2 # See index.html for further information. |
1371
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
3 |
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
4 PKG := suitesparse |
3551
1f81856eba40
suitesparse: update to 4.1.2
John Donoghue <john.donoghue@ieee.org>
parents:
3545
diff
changeset
|
5 $(PKG)_VERSION := 4.1.2 |
1f81856eba40
suitesparse: update to 4.1.2
John Donoghue <john.donoghue@ieee.org>
parents:
3545
diff
changeset
|
6 $(PKG)_CHECKSUM := 2fec3bf93314bd14cbb7470c0a2c294988096ed6 |
1371
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
7 $(PKG)_SUBDIR := SuiteSparse |
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
8 $(PKG)_FILE := SuiteSparse-$($(PKG)_VERSION).tar.gz |
1385
08b296ec290e
cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1377
diff
changeset
|
9 $(PKG)_URL := http://www.cise.ufl.edu/research/sparse/SuiteSparse/$($(PKG)_FILE) |
2738
3b14416f4c51
package suitesparse: add secondary url
Tony Theodore <tonyt@logyst.com>
parents:
2726
diff
changeset
|
10 $(PKG)_URL_2 := https://distfiles.macports.org/SuiteSparse/$($(PKG)_FILE) |
3545
c21ca79d7980
Remove ENABLE_OPEN_BLAS from .mk files and use just to add openblass to the distribution
John Donoghue
parents:
3480
diff
changeset
|
11 $(PKG)_DEPS := blas lapack |
3069
076acecb9c21
Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents:
3048
diff
changeset
|
12 |
3545
c21ca79d7980
Remove ENABLE_OPEN_BLAS from .mk files and use just to add openblass to the distribution
John Donoghue
parents:
3480
diff
changeset
|
13 $(PKG)_BLAS_LIB := blas |
1372
4c3f4e0e3194
improvements for packages: metis suitesparse
Tony Theodore <tonyt@logyst.com>
parents:
1371
diff
changeset
|
14 |
1371
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
15 define $(PKG)_UPDATE |
2525
4d0f3a9da57e
all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents:
2483
diff
changeset
|
16 $(WGET) -q -O- 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/' | \ |
1385
08b296ec290e
cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1377
diff
changeset
|
17 $(SED) -n 's,.*SuiteSparse-\([0-9][^"]*\)\.tar.*,\1,p' | \ |
1371
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
18 head -1 |
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
19 endef |
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
20 |
2887 | 21 $(PKG)_STATICLIBS_1 := \ |
22 SuiteSparse_config/libsuitesparseconfig.a \ | |
23 SuiteSparse_config/xerbla/libcerbla.a \ | |
24 AMD/Lib/libamd.a \ | |
25 CAMD/Lib/libcamd.a \ | |
26 COLAMD/Lib/libcolamd.a \ | |
27 CCOLAMD/Lib/libccolamd.a \ | |
28 CSparse/Lib/libcsparse.a \ | |
29 CXSparse/Lib/libcxsparse.a \ | |
3114
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3078
diff
changeset
|
30 CHOLMOD/Lib/libcholmod.a \ |
2887 | 31 SPQR/Lib/libspqr.a \ |
32 BTF/Lib/libbtf.a \ | |
33 LDL/Lib/libldl.a \ | |
34 KLU/Lib/libklu.a \ | |
35 RBio/Lib/librbio.a \ | |
36 UMFPACK/Lib/libumfpack.a | |
37 | |
3477
6a36441bfafd
suitesparse.mk: Add -DLONGBLAS to CPPFLAGS for --enable-64 Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3469
diff
changeset
|
38 $(PKG)_CPPFLAGS := -DNTIMER |
6a36441bfafd
suitesparse.mk: Add -DLONGBLAS to CPPFLAGS for --enable-64 Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3469
diff
changeset
|
39 |
6a36441bfafd
suitesparse.mk: Add -DLONGBLAS to CPPFLAGS for --enable-64 Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3469
diff
changeset
|
40 ifeq ($(MXE_WINDOWS_BUILD),yes) |
6a36441bfafd
suitesparse.mk: Add -DLONGBLAS to CPPFLAGS for --enable-64 Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3469
diff
changeset
|
41 ifeq ($(ENABLE_64),yes) |
6a36441bfafd
suitesparse.mk: Add -DLONGBLAS to CPPFLAGS for --enable-64 Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3469
diff
changeset
|
42 $(PKG)_CPPFLAGS += -DLONGBLAS='long long' |
6a36441bfafd
suitesparse.mk: Add -DLONGBLAS to CPPFLAGS for --enable-64 Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3469
diff
changeset
|
43 endif |
6a36441bfafd
suitesparse.mk: Add -DLONGBLAS to CPPFLAGS for --enable-64 Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3469
diff
changeset
|
44 endif |
6a36441bfafd
suitesparse.mk: Add -DLONGBLAS to CPPFLAGS for --enable-64 Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3469
diff
changeset
|
45 |
1371
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
46 define $(PKG)_BUILD |
1386
0f61e783e13a
fix build issues of packages: lapack suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1385
diff
changeset
|
47 # exclude demos |
0f61e783e13a
fix build issues of packages: lapack suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1385
diff
changeset
|
48 find '$(1)' -name 'Makefile' \ |
0f61e783e13a
fix build issues of packages: lapack suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1385
diff
changeset
|
49 -exec $(SED) -i 's,( cd Demo,#( cd Demo,' {} \; |
1385
08b296ec290e
cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1377
diff
changeset
|
50 |
3114
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3078
diff
changeset
|
51 if test $(MXE_SYSTEM) = msvc; then \ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3078
diff
changeset
|
52 (cd '$(1)'; \ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3078
diff
changeset
|
53 (cd CXSparse_newfiles && tar cfz ../CXSparse_newfiles.tar.gz .); \ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3078
diff
changeset
|
54 ./CSparse_to_CXSparse CSparse CXSparse CXSparse_newfiles.tar.gz) \ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3078
diff
changeset
|
55 fi |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3078
diff
changeset
|
56 |
1385
08b296ec290e
cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1377
diff
changeset
|
57 # build all |
1439
b505b699c280
cleanup package: suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1390
diff
changeset
|
58 $(MAKE) -C '$(1)' -j '$(JOBS)' \ |
3477
6a36441bfafd
suitesparse.mk: Add -DLONGBLAS to CPPFLAGS for --enable-64 Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3469
diff
changeset
|
59 CPPFLAGS="$($(PKG)_CPPFLAGS)" \ |
2997 | 60 CC='$(MXE_CC)' \ |
61 CXX='$(MXE_CXX)' \ | |
62 CPLUSPLUS='$(MXE_CXX)' \ | |
63 F77='$(MXE_F77)' \ | |
64 FFLAGS='$(MXE_FFLAGS)' \ | |
65 CFLAGS='$(MXE_CFLAGS)' \ | |
66 CXXFLAGS='$(MXE_CXXFLAGS)' \ | |
67 AR='$(MXE_AR)' \ | |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
68 RANLIB='$(MXE_RANLIB)' \ |
3069
076acecb9c21
Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents:
3048
diff
changeset
|
69 BLAS='-l$($(PKG)_BLAS_LIB) -lgfortran -lgfortranbegin' \ |
1440
30fed101654f
remove package metis because it is not (yet) Free Software
Volker Grabsch <vog@notjusthosting.com>
parents:
1439
diff
changeset
|
70 CHOLMOD_CONFIG='-DNPARTITION' |
1372
4c3f4e0e3194
improvements for packages: metis suitesparse
Tony Theodore <tonyt@logyst.com>
parents:
1371
diff
changeset
|
71 |
1385
08b296ec290e
cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1377
diff
changeset
|
72 # install library files |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
73 $(INSTALL) -d '$(3)$(HOST_LIBDIR)' |
2887 | 74 |
75 for f in $(addprefix $(1)/, $($(PKG)_STATICLIBS_1)); do \ | |
2868
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
76 if [ $(BUILD_SHARED) = yes ]; then \ |
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
77 lib=`basename $$f .a`; \ |
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
78 dir=`dirname $$f`; \ |
2887 | 79 echo "building and installing shared libraries for $$lib"; \ |
80 deplibs=""; \ | |
2868
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
81 case $$lib in \ |
2887 | 82 libcholmod) \ |
3078
31241ea2a057
Updates for openblas compile
John Donoghue <john.donoghue@ieee.org>
parents:
3069
diff
changeset
|
83 deplibs="-lamd -lcolamd -lsuitesparseconfig -llapack -l$($(PKG)_BLAS_LIB)"; \ |
2887 | 84 ;; \ |
85 libklu) \ | |
86 deplibs="-lbtf -lamd -lcolamd -lsuitesparseconfig"; \ | |
87 ;; \ | |
2868
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
88 librbio) \ |
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
89 deplibs="-lsuitesparseconfig"; \ |
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
90 ;; \ |
2887 | 91 libspqr) \ |
3069
076acecb9c21
Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents:
3048
diff
changeset
|
92 deplibs="-lcholmod -lsuitesparseconfig -llapack -l$($(PKG)_BLAS_LIB)"; \ |
2887 | 93 ;; \ |
2868
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
94 libumfpack) \ |
3069
076acecb9c21
Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents:
3048
diff
changeset
|
95 deplibs="-lcholmod -lamd -lsuitesparseconfig -l$($(PKG)_BLAS_LIB)"; \ |
2868
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
96 ;; \ |
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
97 esac; \ |
2887 | 98 if [ -n "$deplibs" ]; then \ |
99 echo " deplibs = $$deplibs"; \ | |
100 fi; \ | |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
101 $(MAKE_SHARED_FROM_STATIC) --ar '$(MXE_AR)' --ld '$(MXE_CXX)' $$f --install '$(INSTALL)' --libdir '$(3)$(HOST_LIBDIR)' --bindir '$(3)$(HOST_BINDIR)' $$deplibs; \ |
2868
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
102 fi; \ |
1c18d3bb1829
Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
2738
diff
changeset
|
103 done |
1376
896bc60de2a9
improvements for packages: cblas lapack suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
1375
diff
changeset
|
104 |
1385
08b296ec290e
cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents:
1377
diff
changeset
|
105 # install include files |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
106 $(INSTALL) -d '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
107 $(INSTALL) -m644 '$(1)/SuiteSparse_config/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
108 $(INSTALL) -m644 '$(1)/AMD/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
109 $(INSTALL) -m644 '$(1)/BTF/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
110 $(INSTALL) -m644 '$(1)/CAMD/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
111 $(INSTALL) -m644 '$(1)/CCOLAMD/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
112 $(INSTALL) -m644 '$(1)/CHOLMOD/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
113 $(INSTALL) -m644 '$(1)/COLAMD/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
114 $(INSTALL) -m644 '$(1)/CSparse/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
115 $(INSTALL) -m644 '$(1)/CXSparse/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
116 $(INSTALL) -m644 '$(1)/KLU/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
117 $(INSTALL) -m644 '$(1)/LDL/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
118 $(INSTALL) -m644 '$(1)/SPQR/Include/'* '$(3)$(HOST_INCDIR)/suitesparse/' |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3114
diff
changeset
|
119 $(INSTALL) -m644 '$(1)/UMFPACK/Include/'*.h '$(3)$(HOST_INCDIR)/suitesparse/' |
1371
c9905856c931
new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff
changeset
|
120 endef |