annotate src/suitesparse.mk @ 3469:8d35ad88beed

* suitesparse.mk: Use CPPFLAGS='-DNTIMER' in Make command.
author John W. Eaton <jwe@octave.org>
date Tue, 28 Jan 2014 15:15:21 -0500
parents cf6f40cededb
children 6a36441bfafd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
2726
d242b96f3650 fix suitesparse checksum
Tony Theodore <tonyt@logyst.com>
parents: 2670
diff changeset
5 $(PKG)_CHECKSUM := 46b24a28eef4b040ea5a02d2c43e82e28b7d6195
1371
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
6 $(PKG)_SUBDIR := SuiteSparse
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
7 $(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
8 $(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
9 $(PKG)_URL_2 := https://distfiles.macports.org/SuiteSparse/$($(PKG)_FILE)
3069
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
10
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
11 ifeq ($(ENABLE_OPENBLAS),yes)
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
12 $(PKG)_DEPS := openblas lapack
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
13 $(PKG)_BLAS_LIB := openblas
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
14 else
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
15 $(PKG)_DEPS := blas lapack
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
16 $(PKG)_BLAS_LIB := blas
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
17 endif
1372
4c3f4e0e3194 improvements for packages: metis suitesparse
Tony Theodore <tonyt@logyst.com>
parents: 1371
diff changeset
18
1371
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
19 define $(PKG)_UPDATE
2525
4d0f3a9da57e all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents: 2483
diff changeset
20 $(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
21 $(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
22 head -1
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
23 endef
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
24
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
25 $(PKG)_STATICLIBS_1 := \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
26 SuiteSparse_config/libsuitesparseconfig.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
27 SuiteSparse_config/xerbla/libcerbla.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
28 AMD/Lib/libamd.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
29 CAMD/Lib/libcamd.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
30 COLAMD/Lib/libcolamd.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
31 CCOLAMD/Lib/libccolamd.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
32 CSparse/Lib/libcsparse.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
33 CXSparse/Lib/libcxsparse.a \
3114
fcf98b1d15f1 [MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3078
diff changeset
34 CHOLMOD/Lib/libcholmod.a \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
35 SPQR/Lib/libspqr.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
36 BTF/Lib/libbtf.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
37 LDL/Lib/libldl.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
38 KLU/Lib/libklu.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
39 RBio/Lib/librbio.a \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
40 UMFPACK/Lib/libumfpack.a
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
41
1371
c9905856c931 new packages: metis suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents:
diff changeset
42 define $(PKG)_BUILD
1386
0f61e783e13a fix build issues of packages: lapack suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1385
diff changeset
43 # exclude demos
0f61e783e13a fix build issues of packages: lapack suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1385
diff changeset
44 find '$(1)' -name 'Makefile' \
0f61e783e13a fix build issues of packages: lapack suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1385
diff changeset
45 -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
46
3114
fcf98b1d15f1 [MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3078
diff changeset
47 if test $(MXE_SYSTEM) = msvc; then \
fcf98b1d15f1 [MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3078
diff changeset
48 (cd '$(1)'; \
fcf98b1d15f1 [MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3078
diff changeset
49 (cd CXSparse_newfiles && tar cfz ../CXSparse_newfiles.tar.gz .); \
fcf98b1d15f1 [MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3078
diff changeset
50 ./CSparse_to_CXSparse CSparse CXSparse CXSparse_newfiles.tar.gz) \
fcf98b1d15f1 [MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3078
diff changeset
51 fi
fcf98b1d15f1 [MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3078
diff changeset
52
1385
08b296ec290e cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1377
diff changeset
53 # build all
1439
b505b699c280 cleanup package: suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1390
diff changeset
54 $(MAKE) -C '$(1)' -j '$(JOBS)' \
3469
8d35ad88beed * suitesparse.mk: Use CPPFLAGS='-DNTIMER' in Make command.
John W. Eaton <jwe@octave.org>
parents: 3293
diff changeset
55 CPPFLAGS='-DNTIMER' \
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
56 CC='$(MXE_CC)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
57 CXX='$(MXE_CXX)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
58 CPLUSPLUS='$(MXE_CXX)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
59 F77='$(MXE_F77)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
60 FFLAGS='$(MXE_FFLAGS)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
61 CFLAGS='$(MXE_CFLAGS)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
62 CXXFLAGS='$(MXE_CXXFLAGS)' \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2887
diff changeset
63 AR='$(MXE_AR)' \
3031
951da75fd09c improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents: 3014
diff changeset
64 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
65 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
66 CHOLMOD_CONFIG='-DNPARTITION'
1372
4c3f4e0e3194 improvements for packages: metis suitesparse
Tony Theodore <tonyt@logyst.com>
parents: 1371
diff changeset
67
1385
08b296ec290e cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1377
diff changeset
68 # install library files
3293
cf6f40cededb Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3114
diff changeset
69 $(INSTALL) -d '$(3)$(HOST_LIBDIR)'
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
70
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
71 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
72 if [ $(BUILD_SHARED) = yes ]; then \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
73 lib=`basename $$f .a`; \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
74 dir=`dirname $$f`; \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
75 echo "building and installing shared libraries for $$lib"; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
76 deplibs=""; \
2868
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
77 case $$lib in \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
78 libcholmod) \
3078
31241ea2a057 Updates for openblas compile
John Donoghue <john.donoghue@ieee.org>
parents: 3069
diff changeset
79 deplibs="-lamd -lcolamd -lsuitesparseconfig -llapack -l$($(PKG)_BLAS_LIB)"; \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
80 ;; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
81 libklu) \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
82 deplibs="-lbtf -lamd -lcolamd -lsuitesparseconfig"; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
83 ;; \
2868
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
84 librbio) \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
85 deplibs="-lsuitesparseconfig"; \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
86 ;; \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
87 libspqr) \
3069
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
88 deplibs="-lcholmod -lsuitesparseconfig -llapack -l$($(PKG)_BLAS_LIB)"; \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
89 ;; \
2868
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
90 libumfpack) \
3069
076acecb9c21 Update octave dependancies that use blas to also use openblas
John Donoghue <john.donoghue@ieee.org>
parents: 3048
diff changeset
91 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
92 ;; \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
93 esac; \
2887
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
94 if [ -n "$deplibs" ]; then \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
95 echo " deplibs = $$deplibs"; \
7811f0697a7a fix suitesparse build
John W. Eaton <jwe@octave.org>
parents: 2876
diff changeset
96 fi; \
3293
cf6f40cededb Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3114
diff changeset
97 $(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
98 fi; \
1c18d3bb1829 Include suitesparse as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents: 2738
diff changeset
99 done
1376
896bc60de2a9 improvements for packages: cblas lapack suitesparse
Alois Schlögl <alois.schloegl@gmail.com>
parents: 1375
diff changeset
100
1385
08b296ec290e cleanup packages: blas cblas lapack metis suitesparse
Volker Grabsch <vog@notjusthosting.com>
parents: 1377
diff changeset
101 # install include files
3293
cf6f40cededb Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3114
diff changeset
102 $(INSTALL) -d '$(3)$(HOST_INCDIR)/suitesparse/'
cf6f40cededb Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3114
diff changeset
103 $(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
104 $(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
105 $(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
106 $(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
107 $(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
108 $(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
109 $(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
110 $(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
111 $(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
112 $(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
113 $(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
114 $(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
115 $(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
116 endef